summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc/xmlrpc_test.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-10-08 09:42:52 +0200
committerTomas Babej <tbabej@redhat.com>2014-11-21 12:14:44 +0100
commit93c69b51278ef5a6b04047b7d38f619101d0d184 (patch)
tree6ad3481e6b360f7abd99771121ddf737161c03ac /ipatests/test_xmlrpc/xmlrpc_test.py
parent84bd4c12469aa74e45182f47f8c9845922085777 (diff)
downloadfreeipa-93c69b51278ef5a6b04047b7d38f619101d0d184.tar.gz
freeipa-93c69b51278ef5a6b04047b7d38f619101d0d184.tar.xz
freeipa-93c69b51278ef5a6b04047b7d38f619101d0d184.zip
Use setup_class/teardown_class in Declarative tests
Pytest will consider each Declarative test individually, running setup/teardown for each one. Move the setup and teardown to the class level. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc/xmlrpc_test.py')
-rw-r--r--ipatests/test_xmlrpc/xmlrpc_test.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/ipatests/test_xmlrpc/xmlrpc_test.py b/ipatests/test_xmlrpc/xmlrpc_test.py
index 2030f1cb2..1f44f7794 100644
--- a/ipatests/test_xmlrpc/xmlrpc_test.py
+++ b/ipatests/test_xmlrpc/xmlrpc_test.py
@@ -172,15 +172,11 @@ class XMLRPC_test(object):
if not server_available:
raise nose.SkipTest('%r: Server not available: %r' %
(cls.__module__, api.env.xmlrpc_uri))
-
- def setup(self):
if not api.Backend.rpcclient.isconnected():
api.Backend.rpcclient.connect(fallback=False)
- def teardown(self):
- """
- nose tear-down fixture.
- """
+ @classmethod
+ def teardown_class(cls):
request.destroy_context()
def failsafe_add(self, obj, pk, **options):