mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Mostly got the test_xmlrpc/ tests working again
This commit is contained in:
committed by
Rob Crittenden
parent
77e782e2cb
commit
48a278047d
@@ -24,26 +24,27 @@ Base class for all XML-RPC tests
|
||||
import sys
|
||||
import socket
|
||||
import nose
|
||||
from ipalib import api
|
||||
from ipalib import errors
|
||||
from ipalib import api, request
|
||||
from ipalib import errors, errors2
|
||||
|
||||
try:
|
||||
api.finalize()
|
||||
except StandardError:
|
||||
pass
|
||||
|
||||
class XMLRPC_test:
|
||||
class XMLRPC_test(object):
|
||||
"""
|
||||
Base class for all XML-RPC plugin tests
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
# FIXME: changing Plugin.name from a property to an instance attribute
|
||||
# somehow broke this.
|
||||
raise nose.SkipTest
|
||||
try:
|
||||
res = api.Command['user_show']('notfound')
|
||||
except socket.error:
|
||||
raise nose.SkipTest
|
||||
if not api.Backend.xmlclient.isconnected():
|
||||
api.Backend.xmlclient.connect()
|
||||
res = api.Command['user_show'](u'notfound')
|
||||
except errors2.NetworkError:
|
||||
raise nose.SkipTest()
|
||||
except errors.NotFound:
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
nose tear-down fixture.
|
||||
"""
|
||||
request.destroy_context()
|
||||
|
||||
Reference in New Issue
Block a user