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

@@ -21,20 +21,17 @@
Test the `ipalib/plugins/hbactest.py` module.
"""
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
from types import NoneType
from nose.tools import raises
import pytest
# Test strategy:
# 1. Create few allow rules: with user categories, with explicit users, with user groups, with groups, with services
# 2. Create users for test
# 3. Run detailed and non-detailed tests for explicitly specified rules, check expected result
#
@pytest.mark.tier1
class test_hbactest(XMLRPC_test):
"""
Test the `hbactest` plugin.
@@ -117,7 +114,7 @@ class test_hbactest(XMLRPC_test):
rules=self.rule_names
)
assert ret['value'] == True
assert ret['error'] is None
assert type(ret['error']) == NoneType
for i in [0,1,2,3]:
assert self.rule_names[i] in ret['matched']