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:
@@ -19,13 +19,11 @@
|
||||
"""
|
||||
Test the `ipaserver/plugins/passwd.py` module.
|
||||
"""
|
||||
|
||||
from nose.tools import assert_raises # pylint: disable=E0611
|
||||
import pytest
|
||||
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import XMLRPC_test, assert_attr_equal
|
||||
from ipalib import api
|
||||
from ipalib import errors
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.tier1
|
||||
@@ -65,5 +63,5 @@ class test_passwd(XMLRPC_test):
|
||||
api.Command['user_del'](self.uid)
|
||||
|
||||
# Verify that it is gone
|
||||
with assert_raises(errors.NotFound):
|
||||
with pytest.raises(errors.NotFound):
|
||||
api.Command['user_show'](self.uid)
|
||||
|
||||
Reference in New Issue
Block a user