Skip to content
This repository has been archived by the owner on Mar 28, 2021. It is now read-only.

Commit

Permalink
Safer test
Browse files Browse the repository at this point in the history
  • Loading branch information
avalente committed Nov 1, 2014
1 parent 3de08a1 commit 062e22d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions appmetrics/tests/test_wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 062e22d

Please sign in to comment.