Skip to content

Commit ab2807f

Browse files
committed
Add test
1 parent d394608 commit ab2807f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_web_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ def test_drop_content_length_header_on_setting_len_to_None(self):
5757
resp.content_length = None
5858
self.assertNotIn('Content-Length', resp.headers)
5959

60+
def test_set_content_length_to_None_on_non_set(self):
61+
req = self.make_request('GET', '/')
62+
resp = StreamResponse(req)
63+
64+
resp.content_length = None
65+
self.assertNotIn('Content-Length', resp.headers)
66+
resp.content_length = None
67+
self.assertNotIn('Content-Length', resp.headers)
68+
6069
def test_setting_content_type(self):
6170

6271
req = self.make_request('GET', '/')

0 commit comments

Comments
 (0)