Imported Upstream version 4.3.1
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
Test the `ipaserver/plugins/pwpolicy.py` module.
|
||||
Test the `ipalib/plugins/pwpolicy.py` module.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from nose.tools import assert_raises # pylint: disable=E0611
|
||||
|
||||
from ipalib import api
|
||||
from ipalib import errors
|
||||
@@ -29,6 +29,7 @@ from ipapython.dn import DN
|
||||
from ipatests.test_xmlrpc import objectclasses
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import (XMLRPC_test, assert_attr_equal,
|
||||
Declarative)
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.tier1
|
||||
@@ -162,8 +163,7 @@ class test_pwpolicy(XMLRPC_test):
|
||||
Test adding password policy to a managed group.
|
||||
"""
|
||||
try:
|
||||
api.Command['pwpolicy_add'](
|
||||
self.user, krbminpwdlife=50, cospriority=2)
|
||||
entry = api.Command['pwpolicy_add'](self.user, krbminpwdlife=50, cospriority=2)['result']
|
||||
except errors.ManagedPolicyError:
|
||||
pass
|
||||
else:
|
||||
@@ -212,7 +212,7 @@ class test_pwpolicy(XMLRPC_test):
|
||||
def test_d_pwpolicy_show(self):
|
||||
"""Test that deleting a group removes its pwpolicy"""
|
||||
api.Command['group_del'](self.group3)
|
||||
with pytest.raises(errors.NotFound):
|
||||
with assert_raises(errors.NotFound):
|
||||
api.Command['pwpolicy_show'](self.group3)
|
||||
|
||||
def test_e_pwpolicy_del(self):
|
||||
|
||||
Reference in New Issue
Block a user