diff options
| author | Chris McDonough <chrism@plope.com> | 2011-12-26 02:26:59 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-12-26 02:26:59 -0500 |
| commit | ce2bcac92baba7a855a84a186e91c5527004e29e (patch) | |
| tree | d9a303b3700b94fb9f3a16b2fd2104fa46f7dd96 /waitress/tests/test_parser.py | |
| parent | 1a7058d173353db64665def471cce575ceea48cf (diff) | |
| download | waitress-ce2bcac92baba7a855a84a186e91c5527004e29e.tar.gz | |
parser coverage
Diffstat (limited to 'waitress/tests/test_parser.py')
| -rw-r--r-- | waitress/tests/test_parser.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/waitress/tests/test_parser.py b/waitress/tests/test_parser.py index 8254f2d..fb71b00 100644 --- a/waitress/tests/test_parser.py +++ b/waitress/tests/test_parser.py @@ -144,7 +144,17 @@ foo: bar""" data = b"GET /foobar HTTP/8.4\ncontent-length: abc" self.parser.parse_header(data) self.assertEqual(self.parser.body_rcv, None) + + def test_parse_header_11_te_chunked(self): + data = b"GET /foobar HTTP/1.1\ntransfer-encoding: chunked" + self.parser.parse_header(data) + self.assertEqual(self.parser.body_rcv.__class__.__name__, + 'ChunkedReceiver') + def test_parse_header_11_expect_continue(self): + data = b"GET /foobar HTTP/1.1\nexpect: 100-continue" + self.parser.parse_header(data) + self.assertEqual(self.parser.expect_continue, True) class TestHTTPRequestParserIntegration(unittest.TestCase): |
