diff --git a/oslo_privsep/tests/test_capabilities.py b/oslo_privsep/tests/test_capabilities.py index 725ea24..67d2bfc 100644 --- a/oslo_privsep/tests/test_capabilities.py +++ b/oslo_privsep/tests/test_capabilities.py @@ -34,7 +34,7 @@ class TestCapabilities(base.BaseTestCase): # Disappointingly, ffi.cast(type, 1) != ffi.cast(type, 1) # so can't just use assert_called_once_with :-( self.assertEqual(1, mock_prctl.call_count) - self.assertItemsEqual( + self.assertCountEqual( [8, 1], # [PR_SET_KEEPCAPS, true] [int(x) for x in mock_prctl.call_args[0]]) @@ -81,7 +81,7 @@ class TestCapabilities(base.BaseTestCase): return 0 mock_capget.side_effect = impl - self.assertItemsEqual( + self.assertCountEqual( ([17, 24, 49], [8, 10, 35, 56], [24, 31, 40]), diff --git a/oslo_privsep/tests/test_daemon.py b/oslo_privsep/tests/test_daemon.py index f3f3ffe..b39ce61 100644 --- a/oslo_privsep/tests/test_daemon.py +++ b/oslo_privsep/tests/test_daemon.py @@ -165,7 +165,7 @@ class DaemonTest(base.BaseTestCase): mock_setgid.assert_called_once_with(84) mock_setgroups.assert_called_once_with([]) - self.assertItemsEqual( + self.assertCountEqual( [mock.call(True), mock.call(False)], mock_keepcaps.mock_calls)