diff --git a/openstackclient/tests/identity/v2_0/test_endpoint.py b/openstackclient/tests/identity/v2_0/test_endpoint.py index 088fdcd1c6..45ece45af9 100644 --- a/openstackclient/tests/identity/v2_0/test_endpoint.py +++ b/openstackclient/tests/identity/v2_0/test_endpoint.py @@ -132,11 +132,12 @@ class TestEndpointDelete(TestEndpoint): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) self.endpoints_mock.delete.assert_called_with( identity_fakes.endpoint_id, ) + self.assertIsNone(result) class TestEndpointList(TestEndpoint): diff --git a/openstackclient/tests/identity/v2_0/test_project.py b/openstackclient/tests/identity/v2_0/test_project.py index 9857029766..38684aaffe 100644 --- a/openstackclient/tests/identity/v2_0/test_project.py +++ b/openstackclient/tests/identity/v2_0/test_project.py @@ -613,10 +613,9 @@ class TestProjectUnset(TestProject): verifylist = [ ('property', ['fee', 'fo']), ] - parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # Set expected values kwargs = { 'description': identity_fakes.project_description, @@ -631,3 +630,4 @@ class TestProjectUnset(TestProject): identity_fakes.project_id, **kwargs ) + self.assertIsNone(result) diff --git a/openstackclient/tests/identity/v2_0/test_role.py b/openstackclient/tests/identity/v2_0/test_role.py index 03b7f92481..3c4b79a4a3 100644 --- a/openstackclient/tests/identity/v2_0/test_role.py +++ b/openstackclient/tests/identity/v2_0/test_role.py @@ -240,11 +240,12 @@ class TestRoleDelete(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) self.roles_mock.delete.assert_called_with( identity_fakes.role_id, ) + self.assertIsNone(result) class TestRoleList(TestRole): @@ -459,7 +460,7 @@ class TestRoleRemove(TestRole): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # RoleManager.remove_user_role(user, role, tenant=None) self.roles_mock.remove_user_role.assert_called_with( @@ -467,6 +468,7 @@ class TestRoleRemove(TestRole): identity_fakes.role_id, identity_fakes.project_id, ) + self.assertIsNone(result) class TestRoleShow(TestRole): diff --git a/openstackclient/tests/identity/v2_0/test_service.py b/openstackclient/tests/identity/v2_0/test_service.py index 606b143327..dc0fbcd122 100644 --- a/openstackclient/tests/identity/v2_0/test_service.py +++ b/openstackclient/tests/identity/v2_0/test_service.py @@ -194,11 +194,12 @@ class TestServiceDelete(TestService): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) self.services_mock.delete.assert_called_with( identity_fakes.service_id, ) + self.assertIsNone(result) class TestServiceList(TestService): diff --git a/openstackclient/tests/identity/v2_0/test_token.py b/openstackclient/tests/identity/v2_0/test_token.py index c90477f942..613139dd3a 100644 --- a/openstackclient/tests/identity/v2_0/test_token.py +++ b/openstackclient/tests/identity/v2_0/test_token.py @@ -99,6 +99,7 @@ class TestTokenRevoke(TestToken): verifylist = [('token', self.TOKEN)] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) self.tokens_mock.delete.assert_called_with(self.TOKEN) + self.assertIsNone(result) diff --git a/openstackclient/tests/identity/v2_0/test_user.py b/openstackclient/tests/identity/v2_0/test_user.py index 9afe4ad12d..921e215da8 100644 --- a/openstackclient/tests/identity/v2_0/test_user.py +++ b/openstackclient/tests/identity/v2_0/test_user.py @@ -414,11 +414,12 @@ class TestUserDelete(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) self.users_mock.delete.assert_called_with( identity_fakes.user_id, ) + self.assertIsNone(result) class TestUserList(TestUser): @@ -578,7 +579,7 @@ class TestUserSet(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # Set expected values kwargs = { @@ -590,6 +591,7 @@ class TestUserSet(TestUser): identity_fakes.user_id, **kwargs ) + self.assertIsNone(result) def test_user_set_password(self): arglist = [ @@ -608,13 +610,14 @@ class TestUserSet(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # UserManager.update_password(user, password) self.users_mock.update_password.assert_called_with( identity_fakes.user_id, 'secret', ) + self.assertIsNone(result) def test_user_set_password_prompt(self): arglist = [ @@ -636,13 +639,14 @@ class TestUserSet(TestUser): mocker = mock.Mock() mocker.return_value = 'abc123' with mock.patch("openstackclient.common.utils.get_password", mocker): - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # UserManager.update_password(user, password) self.users_mock.update_password.assert_called_with( identity_fakes.user_id, 'abc123', ) + self.assertIsNone(result) def test_user_set_email(self): arglist = [ @@ -660,7 +664,7 @@ class TestUserSet(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # Set expected values kwargs = { @@ -672,6 +676,7 @@ class TestUserSet(TestUser): identity_fakes.user_id, **kwargs ) + self.assertIsNone(result) def test_user_set_project(self): arglist = [ @@ -689,13 +694,14 @@ class TestUserSet(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # UserManager.update_tenant(user, tenant) self.users_mock.update_tenant.assert_called_with( identity_fakes.user_id, identity_fakes.project_id, ) + self.assertIsNone(result) def test_user_set_enable(self): arglist = [ @@ -713,7 +719,7 @@ class TestUserSet(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # Set expected values kwargs = { @@ -724,6 +730,7 @@ class TestUserSet(TestUser): identity_fakes.user_id, **kwargs ) + self.assertIsNone(result) def test_user_set_disable(self): arglist = [ @@ -741,7 +748,7 @@ class TestUserSet(TestUser): ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) - self.cmd.take_action(parsed_args) + result = self.cmd.take_action(parsed_args) # Set expected values kwargs = { @@ -752,6 +759,7 @@ class TestUserSet(TestUser): identity_fakes.user_id, **kwargs ) + self.assertIsNone(result) class TestUserShow(TestUser):