diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 000000000..6350e9868 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1 @@ +.coverage diff --git a/test/test_server.py b/test/test_server.py index 3bfbab5bb..efd269eb1 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -1,6 +1,5 @@ import urllib, urllib2 import libpathod.test, requests -import libpry import tutils class uSanity(tutils.ProxTest): diff --git a/test/test_utils.py b/test/test_utils.py index 8bff03034..8a881b4e8 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1,202 +1,168 @@ import textwrap, re, json -import libpry from libmproxy import utils +from nose.tools import assert_raises +import tutils utils.CERT_SLEEP_TIME = 0 -class uformat_timestamp(libpry.AutoTree): - def test_simple(self): - assert utils.format_timestamp(utils.timestamp()) +def test_format_timestamp(): + assert utils.format_timestamp(utils.timestamp()) -class uisBin(libpry.AutoTree): - def test_simple(self): - assert not utils.isBin("testing\n\r") - assert utils.isBin("testing\x01") - assert utils.isBin("testing\x0e") - assert utils.isBin("testing\x7f") +def test_isBin(): + assert not utils.isBin("testing\n\r") + assert utils.isBin("testing\x01") + assert utils.isBin("testing\x0e") + assert utils.isBin("testing\x7f") -class uisXML(libpry.AutoTree): - def test_simple(self): - assert not utils.isXML("foo") - assert utils.isXML("