summaryrefslogtreecommitdiff
path: root/tests/test_dh.py
diff options
context:
space:
mode:
authorHeikki Toivonen <heikki@heikkitoivonen.net>2006-12-15 00:17:00 +0000
committerHeikki Toivonen <heikki@heikkitoivonen.net>2006-12-15 00:17:00 +0000
commitcc79fc74eb80257d67837c0ea54e60efa32b7eaf (patch)
treec9a06a9a42e2e80144ce1a7e200b7e054773ce0c /tests/test_dh.py
parent381167f5d6add76b9461c30d2dabf156e3ff3f04 (diff)
downloadm2crypto-cc79fc74eb80257d67837c0ea54e60efa32b7eaf.tar.gz
Make all test methods start with test_, so that running individual suites works,
for example: python setup.py test --test-suite=tests.test_x509 -q git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@504 2715db39-9adf-0310-9c64-84f055769b4b
Diffstat (limited to 'tests/test_dh.py')
-rw-r--r--tests/test_dh.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_dh.py b/tests/test_dh.py
index 28a5d1b..5ec8d03 100644
--- a/tests/test_dh.py
+++ b/tests/test_dh.py
@@ -17,18 +17,18 @@ class DHTestCase(unittest.TestCase):
def genparam_callback2(self):
pass
- def check_init_junk(self):
+ def test_init_junk(self):
self.assertRaises(TypeError, DH.DH, 'junk')
- def check_gen_params(self):
+ def test_gen_params(self):
a = DH.gen_params(128, 2, self.genparam_callback)
assert a.check_params() == 0
- def check_gen_params_bad_cb(self):
+ def test_gen_params_bad_cb(self):
a = DH.gen_params(128, 2, self.genparam_callback2)
assert a.check_params() == 0
- def check_print_params(self):
+ def test_print_params(self):
a = DH.gen_params(128, 2, self.genparam_callback)
bio = BIO.MemoryBuffer()
a.print_params(bio)
@@ -36,11 +36,11 @@ class DHTestCase(unittest.TestCase):
assert params.find('(128 bit)')
assert params.find('generator: 2 (0x2)')
- def check_load_params(self):
+ def test_load_params(self):
a = DH.load_params('tests/dhparams.pem')
assert a.check_params() == 0
- def check_compute_key(self):
+ def test_compute_key(self):
a = DH.load_params('tests/dhparams.pem')
b = DH.set_params(a.p, a.g)
a.gen_key()
@@ -51,7 +51,7 @@ class DHTestCase(unittest.TestCase):
def suite():
- return unittest.makeSuite(DHTestCase, 'check_')
+ return unittest.makeSuite(DHTestCase)
if __name__=='__main__':