Skip to content

Commit

Permalink
Merge pull request #73 from vintasoftware/tests
Browse files Browse the repository at this point in the history
Fixing assert raises test warning
  • Loading branch information
filipeximenes committed Nov 7, 2015
2 parents 23cf15a + df2fa15 commit 7153191
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_tapioca.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@ def setUp(self):
self.wrapper = TesterClient()

def test_when_executor_has_no_response(self):
with self.assertRaisesRegexp(Exception, "has no response"):
with self.assertRaises(Exception) as context:
self.wrapper.test().response()

exception = context.exception

self.assertIn("has no response", str(exception))

@responses.activate
def test_get_request(self):
responses.add(responses.GET, self.wrapper.test().data(),
Expand Down

0 comments on commit 7153191

Please sign in to comment.