diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2016-04-15 00:40:12 -0600 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2016-04-15 02:20:45 -0600 |
| commit | addaa00273da1fdc612de5194ec797dc292dacba (patch) | |
| tree | 717014b8676ebacb01d1a67a4b25586458822f04 /tests | |
| parent | 2eb19f4c3d41b0ed3860be78c57b838e050fed8d (diff) | |
| download | webob-addaa00273da1fdc612de5194ec797dc292dacba.tar.gz | |
test_client_functional.py convert to assert from nose
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_client_functional.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py index 4de0f72..3c8601a 100644 --- a/tests/test_client_functional.py +++ b/tests/test_client_functional.py @@ -1,10 +1,11 @@ import time -import urllib + +import pytest + from webob import Request, Response from webob.dec import wsgify from webob.client import SendRequest from .test_in_wsgiref import serve -from nose.tools import assert_raises @wsgify @@ -44,7 +45,8 @@ def test_client(client_app=None): assert req.environ.get('SERVER_NAME') is None assert req.environ.get('SERVER_PORT') is None assert req.environ.get('HTTP_HOST') is None - assert_raises(ValueError, req.send, client_app) + with pytest.raises(ValueError): + req.send(client_app) req = Request.blank(server.url) req.environ['CONTENT_LENGTH'] = 'not a number' assert req.send(client_app).status_code == 200 |
