From ae008ed80b870688e4e0fe5ff305dc40c17458b4 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 1 Feb 2017 16:48:46 +0100 Subject: replace tutils.raises with pytest.raises + shim --- test/pathod/test_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/pathod/test_test.py') diff --git a/test/pathod/test_test.py b/test/pathod/test_test.py index c2e1c6e9..40f45f53 100644 --- a/test/pathod/test_test.py +++ b/test/pathod/test_test.py @@ -1,5 +1,7 @@ import logging import requests +import pytest + from pathod import test from mitmproxy.test import tutils @@ -17,7 +19,7 @@ class TestDaemonManual: rsp = requests.get("http://localhost:%s/p/202:da" % d.port) assert rsp.ok assert rsp.status_code == 202 - with tutils.raises(requests.ConnectionError): + with pytest.raises(requests.ConnectionError): requests.get("http://localhost:%s/p/202:da" % d.port) def test_startstop_ssl(self): @@ -29,7 +31,7 @@ class TestDaemonManual: assert rsp.ok assert rsp.status_code == 202 d.shutdown() - with tutils.raises(requests.ConnectionError): + with pytest.raises(requests.ConnectionError): requests.get("http://localhost:%s/p/202:da" % d.port) def test_startstop_ssl_explicit(self): @@ -46,5 +48,5 @@ class TestDaemonManual: assert rsp.ok assert rsp.status_code == 202 d.shutdown() - with tutils.raises(requests.ConnectionError): + with pytest.raises(requests.ConnectionError): requests.get("http://localhost:%s/p/202:da" % d.port) -- cgit v1.2.3