From d253ebc142d80708a1bdc065d3db05d1394e3819 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 30 Jan 2016 22:03:24 +0100 Subject: fix test request and response headers --- test/http/http1/test_assemble.py | 5 +++-- test/http/http1/test_read.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/http/http1/test_assemble.py b/test/http/http1/test_assemble.py index ed94292d..31a62438 100644 --- a/test/http/http1/test_assemble.py +++ b/test/http/http1/test_assemble.py @@ -24,10 +24,11 @@ def test_assemble_request(): def test_assemble_request_head(): - c = assemble_request_head(treq()) + c = assemble_request_head(treq(content="foo")) assert b"GET" in c assert b"qvalue" in c - assert b"content" not in c + assert b"content-length" in c + assert b"foo" not in c def test_assemble_response(): diff --git a/test/http/http1/test_read.py b/test/http/http1/test_read.py index 8a315508..90234070 100644 --- a/test/http/http1/test_read.py +++ b/test/http/http1/test_read.py @@ -159,10 +159,10 @@ def test_expected_http_body_size(): # no length assert expected_http_body_size( - treq() + treq(headers=Headers()) ) == 0 assert expected_http_body_size( - treq(), tresp() + treq(headers=Headers()), tresp(headers=Headers()) ) == -1 -- cgit v1.2.3