Imported Debian patch 4.0.5-6~numeezy

This commit is contained in:
Alexandre Ellert
2016-02-17 15:07:45 +01:00
committed by Mario Fetka
parent c44de33144
commit 10dfc9587b
1203 changed files with 53869 additions and 241462 deletions

View File

@@ -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 '-'")