From 062e22dd713911bd84046fa62607776f8d9b5c8a Mon Sep 17 00:00:00 2001 From: Antonio Valente Date: Sat, 1 Nov 2014 19:42:48 +0100 Subject: [PATCH] Safer test --- appmetrics/tests/test_wsgi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appmetrics/tests/test_wsgi.py b/appmetrics/tests/test_wsgi.py index 9369840..e468535 100644 --- a/appmetrics/tests/test_wsgi.py +++ b/appmetrics/tests/test_wsgi.py @@ -4,7 +4,7 @@ import mock from nose.tools import ( assert_equal, assert_false, assert_is_instance, raises, assert_raises, - assert_regexp_matches) + assert_regexp_matches, assert_items_equal) import werkzeug, werkzeug.test from .. import wsgi, metrics, py3comp @@ -165,9 +165,11 @@ def test_call_with_invalid_method(self): ] assert_equal( self.start_response.call_args_list, - [mock.call("405 METHOD NOT ALLOWED", expected_headers)] + [mock.call("405 METHOD NOT ALLOWED", mock.ANY)] ) + assert_items_equal(self.start_response.call_args_list[0][0][1], expected_headers) + def test_call_ok(self): self.handler.return_value = json.dumps("results")