'Pytest assert message with http or https
I'm using pytest to assert a message that contains an URL that was just http. But now, I'm also have https for the same message. Does anyone have a clue to how can I handle the same message even if I receive http or https? I've been looking after the regex, but couldn't find a way to deal with it. For now, my code is like:
assert (
msg
== "Client Error for url: http://..."
)
I'm trying to find a way to that message can assert this text even when get http or https. Is that possible to do without create one assert for http and another for https?
Thank you all!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
