diff options
| author | Gabriel Falcao <gabriel@nacaolivre.org> | 2011-06-29 22:12:51 -0400 |
|---|---|---|
| committer | Gabriel Falcao <gabriel@nacaolivre.org> | 2011-06-29 22:12:51 -0400 |
| commit | a93c893f67b4662a45935488ad97bceb2e4389d8 (patch) | |
| tree | 38a83ef20f7ba89fe5e735e91625f758d7d2229b /tests | |
| parent | cb63682be26879a7d17405073be9d2aa26df4bfd (diff) | |
| download | httpretty-a93c893f67b4662a45935488ad97bceb2e4389d8.tar.gz | |
adding a dummy last_request for the sake of meaningful assertion errors0.4
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_httpretty.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test_httpretty.py b/tests/unit/test_httpretty.py index 11f2fc9..a6806c9 100644 --- a/tests/unit/test_httpretty.py +++ b/tests/unit/test_httpretty.py @@ -28,6 +28,7 @@ from sure import that from httpretty import HTTPretty, HTTPrettyError + def test_httpretty_should_raise_proper_exception_on_inconsistent_length(): u"HTTPretty should raise proper exception on inconsistent Content-Length / "\ "registered response body" @@ -48,3 +49,10 @@ def test_httpretty_should_raise_proper_exception_on_inconsistent_length(): 'but the body you registered for that has actually length "10".\n' 'Fix that, or if you really want that, call register_uri with "fill_with" callback.' ) + + +def test_does_not_have_last_request_by_default(): + u'HTTPretty.last_request is a dummy object by default' + + assert that(HTTPretty.last_request.headers).is_empty + assert that(HTTPretty.last_request.body).is_empty |
