summaryrefslogtreecommitdiff
path: root/tests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py30
1 files changed, 3 insertions, 27 deletions
diff --git a/tests/utils.py b/tests/utils.py
index f878a5e2..4f1ca3f1 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,29 +1,5 @@
-from nose.tools import ok_
+import unittest
-def fail(msg):
- raise AssertionError(msg)
-
-
-def assert_in(thing, seq, msg=None):
- msg = msg or "'%s' not found in %s" % (thing, seq)
- ok_(thing in seq, msg)
-
-
-def assert_not_in(thing, seq, msg=None):
- msg = msg or "unexpected '%s' found in %s" % (thing, seq)
- ok_(thing not in seq, msg)
-
-
-def assert_has_keys(dict, required=[], optional=[]):
- keys = dict.keys()
- for k in required:
- assert_in(k, keys, "required key %s missing from %s" % (k, dict))
- allowed_keys = set(required) | set(optional)
- extra_keys = set(keys).difference(set(required + optional))
- if extra_keys:
- fail("found unexpected keys: %s" % list(extra_keys))
-
-
-def assert_isinstance(thing, kls):
- ok_(isinstance(thing, kls), "%s is not an instance of %s" % (thing, kls))
+class TestCase(unittest.TestCase):
+ pass