Imported Debian patch 4.0.5-6~numeezy
This commit is contained in:
committed by
Mario Fetka
parent
c44de33144
commit
10dfc9587b
@@ -22,18 +22,11 @@ Test the `ipalib/plugins/sudorule.py` module.
|
||||
"""
|
||||
|
||||
from nose.tools import raises, assert_raises # pylint: disable=E0611
|
||||
import six
|
||||
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import XMLRPC_test, assert_attr_equal
|
||||
from xmlrpc_test import XMLRPC_test, assert_attr_equal
|
||||
from ipalib import api
|
||||
from ipalib import errors
|
||||
import pytest
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
|
||||
@pytest.mark.tier1
|
||||
class test_sudorule(XMLRPC_test):
|
||||
"""
|
||||
Test the `sudorule` plugin.
|
||||
@@ -501,7 +494,7 @@ class test_sudorule(XMLRPC_test):
|
||||
self.rule_name,
|
||||
addattr='externalhost=%s' % self.test_invalid_host
|
||||
)
|
||||
except errors.ValidationError as e:
|
||||
except errors.ValidationError, e:
|
||||
assert unicode(e) == ("invalid 'externalhost': only letters, " +
|
||||
"numbers, '_', '-' are allowed. " +
|
||||
"DNS label may not start or end with '-'")
|
||||
|
||||
Reference in New Issue
Block a user