🎨 run black
This commit is contained in:
parent
557cd39c13
commit
991d6be5a3
1 changed files with 13 additions and 3 deletions
|
@ -417,23 +417,33 @@ class TestGzipMiddleware:
|
||||||
def test_invalid_response_length(self):
|
def test_invalid_response_length(self):
|
||||||
class FakeServer:
|
class FakeServer:
|
||||||
gzip_minimum_response_length = "asdf"
|
gzip_minimum_response_length = "asdf"
|
||||||
|
|
||||||
with pytest.raises(ConfigError) as e:
|
with pytest.raises(ConfigError) as e:
|
||||||
CheckValidGzipMinimumLength(server=FakeServer).check()
|
CheckValidGzipMinimumLength(server=FakeServer).check()
|
||||||
assert e.value.args[0] == CheckValidGzipMinimumLength.INVALID_GZIP_MINIMUM_LENGTH
|
assert (
|
||||||
|
e.value.args[0] == CheckValidGzipMinimumLength.INVALID_GZIP_MINIMUM_LENGTH
|
||||||
|
)
|
||||||
|
|
||||||
def test_negative_response_length(self):
|
def test_negative_response_length(self):
|
||||||
class FakeServer:
|
class FakeServer:
|
||||||
gzip_minimum_response_length = -1
|
gzip_minimum_response_length = -1
|
||||||
|
|
||||||
with pytest.raises(ConfigError) as e:
|
with pytest.raises(ConfigError) as e:
|
||||||
CheckValidGzipMinimumLength(server=FakeServer).check()
|
CheckValidGzipMinimumLength(server=FakeServer).check()
|
||||||
assert e.value.args[0] == CheckValidGzipMinimumLength.INVALID_GZIP_MINIMUM_LENGTH
|
assert (
|
||||||
|
e.value.args[0] == CheckValidGzipMinimumLength.INVALID_GZIP_MINIMUM_LENGTH
|
||||||
|
)
|
||||||
|
|
||||||
def test_bad_compression_level(self):
|
def test_bad_compression_level(self):
|
||||||
class FakeServer:
|
class FakeServer:
|
||||||
gzip_compression_level = "asdf"
|
gzip_compression_level = "asdf"
|
||||||
|
|
||||||
with pytest.raises(ConfigError) as e:
|
with pytest.raises(ConfigError) as e:
|
||||||
CheckValidGzipCompressionLevel(server=FakeServer).check()
|
CheckValidGzipCompressionLevel(server=FakeServer).check()
|
||||||
assert e.value.args[0] == CheckValidGzipCompressionLevel.INVALID_GZIP_COMPRESSION_LEVEL
|
assert (
|
||||||
|
e.value.args[0]
|
||||||
|
== CheckValidGzipCompressionLevel.INVALID_GZIP_COMPRESSION_LEVEL
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestCorsMiddleware:
|
class TestCorsMiddleware:
|
||||||
|
|
Loading…
Add table
Reference in a new issue