Skip to content

Commit

Permalink
Removed unnecessary tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Narea committed Nov 27, 2015
1 parent 8d42575 commit ad81308
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/test_embedded_wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ def test_string_as_response(self):
environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts")
request = _make_request(**environ)
django_response = call_wsgi_app(app, request, "/posts")
# Checking the response:
self._test_response_headers(django_response)

http_response_content = b"body"
eq_(http_response_content, django_response.content)
Expand All @@ -208,8 +206,6 @@ def test_iterable_as_response(self):
environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts")
request = _make_request(**environ)
django_response = call_wsgi_app(app, request, "/posts")
# Checking the response:
self._test_response_headers(django_response)

http_response_content = b"body as iterable"
eq_(http_response_content, django_response.content)
Expand All @@ -220,8 +216,6 @@ def test_write_response(self):
environ = complete_environ(SCRIPT_NAME="/dev", PATH_INFO="/blog/posts")
request = _make_request(**environ)
django_response = call_wsgi_app(app, request, "/posts")
# Checking the response:
self._test_response_headers(django_response)

http_response_content = b"body as iterable"
eq_(http_response_content, django_response.content)
Expand All @@ -238,15 +232,6 @@ def test_closure_response(self):
django_response.close()
ok_(app.app_iter.closed)

def _test_response_headers(self, response):
expected_headers = {
'X-HEADER': 'Foo',
'Content-Type': 'text/html; charset=utf-8',
}
for header_name, header_value in expected_headers.items():
ok_(response.has_header(header_name))
eq_(response[header_name], header_value)


class TestWSGIView(BaseDjangoTestCase):
"""
Expand Down

0 comments on commit ad81308

Please sign in to comment.