mirror of
https://github.com/httpie/cli.git
synced 2025-06-28 21:41:47 +02:00
Make test_binary_suppresses_*
deterministic
This commit is contained in:
parent
a969013bdd
commit
e93de1fbe7
@ -34,12 +34,12 @@ class TestBinaryRequestData:
|
|||||||
class TestBinaryResponseData:
|
class TestBinaryResponseData:
|
||||||
|
|
||||||
def test_binary_suppresses_when_terminal(self, httpbin):
|
def test_binary_suppresses_when_terminal(self, httpbin):
|
||||||
r = http('GET', httpbin + '/bytes/1024')
|
r = http('GET', httpbin + '/bytes/1024?seed=1')
|
||||||
assert BINARY_SUPPRESSED_NOTICE.decode() in r
|
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, httpbin):
|
||||||
env = MockEnvironment(stdin_isatty=True, stdout_isatty=False)
|
env = MockEnvironment(stdin_isatty=True, stdout_isatty=False)
|
||||||
r = http('--pretty=all', 'GET', httpbin + '/bytes/1024', env=env)
|
r = http('--pretty=all', 'GET', httpbin + '/bytes/1024?seed=1', env=env)
|
||||||
assert BINARY_SUPPRESSED_NOTICE.decode() in r
|
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, httpbin):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user