diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-10-07 12:48:22 +0200 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2014-11-21 12:14:44 +0100 |
commit | 375e9f7c4b855ee8abbab6b5574d54bbd9fb1742 (patch) | |
tree | 88cf59d1736cc9fb3bf23c6a8c63f4c498ebf06a /ipatests/test_ipapython | |
parent | 7de424f42541e73ed24a95f1dd90ff4a61e111fa (diff) | |
download | freeipa-375e9f7c4b855ee8abbab6b5574d54bbd9fb1742.tar.gz freeipa-375e9f7c4b855ee8abbab6b5574d54bbd9fb1742.tar.xz freeipa-375e9f7c4b855ee8abbab6b5574d54bbd9fb1742.zip |
tests: Use PEP8-compliant setup/teardown method names
The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.
https://fedorahosted.org/freeipa/ticket/4610
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests/test_ipapython')
-rw-r--r-- | ipatests/test_ipapython/test_ipavalidate.py | 6 | ||||
-rw-r--r-- | ipatests/test_ipapython/test_keyring.py | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/ipatests/test_ipapython/test_ipavalidate.py b/ipatests/test_ipapython/test_ipavalidate.py index 3393de00e..b912797dd 100644 --- a/ipatests/test_ipapython/test_ipavalidate.py +++ b/ipatests/test_ipapython/test_ipavalidate.py @@ -25,12 +25,6 @@ import unittest from ipapython import ipavalidate class TestValidate(unittest.TestCase): - def setUp(self): - pass - - def tearDown(self): - pass - def test_validEmail(self): self.assertEqual(True, ipavalidate.Email("test@freeipa.org")) self.assertEqual(True, ipavalidate.Email("", notEmpty=False)) diff --git a/ipatests/test_ipapython/test_keyring.py b/ipatests/test_ipapython/test_keyring.py index 568fd5ee1..e92b1b465 100644 --- a/ipatests/test_ipapython/test_keyring.py +++ b/ipatests/test_ipapython/test_keyring.py @@ -36,7 +36,7 @@ class test_keyring(object): Test the kernel keyring interface """ - def setUp(self): + def setup(self): try: kernel_keyring.del_key(TEST_KEY) except ValueError: |