mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Replace nose with unittest and pytest
* Replace raise nose.SkipTest with raise unittest.SkipTest * Replace nose.tools.assert_equal(a, b) with assert a == b * Replace nose.tools.raises with pytest.raises * Convert @raises decorator to pytest.raises() but just for relevant lines. * Remove nose dependency I left the nose_compat pytest plugin in place. It can be removed in another request in case it is no longer used. https://pagure.io/freeipa/issue/7301 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -21,7 +21,8 @@ Test adding/removing external members (trusted domain objects) to IPA groups.
|
||||
These tests are skipped if trust is not established.
|
||||
"""
|
||||
|
||||
import nose
|
||||
import unittest
|
||||
|
||||
from ipalib import api
|
||||
from ipapython.dn import DN
|
||||
from ipatests.test_xmlrpc import objectclasses
|
||||
@@ -53,7 +54,7 @@ class test_external_members(Declarative):
|
||||
|
||||
trusts = api.Command['trust_find']()
|
||||
if trusts['count'] == 0:
|
||||
raise nose.SkipTest('Trust is not established')
|
||||
raise unittest.SkipTest('Trust is not established')
|
||||
|
||||
cleanup_commands = [
|
||||
('group_del', [group_name], {}),
|
||||
|
||||
Reference in New Issue
Block a user