Imported Debian patch 4.0.5-6~numeezy
This commit is contained in:
committed by
Mario Fetka
parent
c44de33144
commit
10dfc9587b
@@ -25,9 +25,6 @@ from ipatests.util import read_only, raises, get_api, ClassChecker
|
||||
from ipalib import crud, frontend, plugable, config
|
||||
from ipalib.parameters import Str
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.tier0
|
||||
|
||||
class CrudChecker(ClassChecker):
|
||||
"""
|
||||
@@ -50,8 +47,8 @@ class CrudChecker(ClassChecker):
|
||||
class user_verb(self.cls):
|
||||
takes_args = args
|
||||
takes_options = options
|
||||
api.add_plugin(user)
|
||||
api.add_plugin(user_verb)
|
||||
api.register(user)
|
||||
api.register(user_verb)
|
||||
api.finalize()
|
||||
return api
|
||||
|
||||
@@ -205,11 +202,10 @@ class test_CrudBackend(ClassChecker):
|
||||
return ldap
|
||||
|
||||
def check_method(self, name, *args):
|
||||
api = 'the api instance'
|
||||
o = self.cls(api)
|
||||
o = self.cls()
|
||||
e = raises(NotImplementedError, getattr(o, name), *args)
|
||||
assert str(e) == 'CrudBackend.%s()' % name
|
||||
sub = self.subcls(api)
|
||||
sub = self.subcls()
|
||||
e = raises(NotImplementedError, getattr(sub, name), *args)
|
||||
assert str(e) == 'ldap.%s()' % name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user