Skip to content

Commit

Permalink
Failed to make SonarCloud happy again.
Browse files Browse the repository at this point in the history
  • Loading branch information
mindflayer committed Feb 5, 2024
1 parent 51818b5 commit 324845f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/main/test_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

@mocketize(strict_mode=True)
def test_strict_mode_fails():
url = "https://httpbin.local/ip"
url = "http://httpbin.local/ip"

with pytest.raises(StrictMocketException):
requests.get(url)


@pytest.mark.skipif('os.getenv("SKIP_TRUE_HTTP", False)')
def test_intermittent_strict_mode():
url = "https://httpbin.local/ip"
url = "http://httpbin.local/ip"

with Mocketizer(strict_mode=False):
requests.get(url)
Expand All @@ -32,7 +32,7 @@ def test_intermittent_strict_mode():

@pytest.mark.skipif('os.getenv("SKIP_TRUE_HTTP", False)')
def test_strict_mode_exceptions():
url = "https://httpbin.local/ip"
url = "http://httpbin.local/ip"

with Mocketizer(strict_mode=True, strict_mode_allowed=["httpbin.local"]):
requests.get(url)
Expand All @@ -42,9 +42,9 @@ def test_strict_mode_exceptions():


def test_strict_mode_error_message():
url = "https://httpbin.local/ip"
url = "http://httpbin.local/ip"

Entry.register(Entry.GET, "https://httpbin.local/user.agent", Response(status=404))
Entry.register(Entry.GET, "http://httpbin.local/user.agent", Response(status=404))

with Mocketizer(strict_mode=True):
with pytest.raises(StrictMocketException) as exc_info:
Expand Down

0 comments on commit 324845f

Please sign in to comment.