Skip to content

Commit

Permalink
unpin werkzeug, allow <4
Browse files Browse the repository at this point in the history
fix #1530
  • Loading branch information
Ousret committed Oct 16, 2024
1 parent 5e87d1b commit da6cc13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ dev =
pytest-httpbin>=0.0.6
responses
pytest-mock
werkzeug<2.1.0
werkzeug<4
flake8
flake8-comprehensions
flake8-deprecated
Expand All @@ -119,7 +119,7 @@ test =
pytest-httpbin>=0.0.6
responses
pytest-mock
werkzeug<2.1.0
werkzeug<4

[options.data_files]
share/man/man1 =
Expand Down
15 changes: 9 additions & 6 deletions tests/test_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,22 @@ def test_binary_file_form(self, httpbin):


class TestBinaryResponseData:
"""local httpbin crash due to an unfixed bug.
See https://github.com/psf/httpbin/pull/41
It is merged but not yet released."""

def test_binary_suppresses_when_terminal(self, httpbin):
r = http('GET', httpbin + '/bytes/1024?seed=1')
def test_binary_suppresses_when_terminal(self, remote_httpbin):
r = http('GET', remote_httpbin + '/bytes/1024?seed=1')
assert BINARY_SUPPRESSED_NOTICE.decode() in r

def test_binary_suppresses_when_not_terminal_but_pretty(self, httpbin):
def test_binary_suppresses_when_not_terminal_but_pretty(self, remote_httpbin):
env = MockEnvironment(stdin_isatty=True, stdout_isatty=False)
r = http('--pretty=all', 'GET', httpbin + '/bytes/1024?seed=1', env=env)
r = http('--pretty=all', 'GET', remote_httpbin + '/bytes/1024?seed=1', env=env)
assert BINARY_SUPPRESSED_NOTICE.decode() in r

def test_binary_included_and_correct_when_suitable(self, httpbin):
def test_binary_included_and_correct_when_suitable(self, remote_httpbin):
env = MockEnvironment(stdin_isatty=True, stdout_isatty=False)
url = httpbin + '/bytes/1024?seed=1'
url = remote_httpbin + '/bytes/1024?seed=1'
r = http('GET', url, env=env)
expected = niquests.get(url).content
assert r == expected

0 comments on commit da6cc13

Please sign in to comment.