remove a mixed style (**{} and param=value)

There are a mixed coding style of "**{param:value}" and "key=value"
in some places. These would be misleading for following developers.
Removing this could remain a clean and clear coding style here.

Change-Id: I92df99e943f76c1c1dba4672c4b59f65ea2b1f06
This commit is contained in:
Kun Huang
2014-03-25 13:22:52 +08:00
parent 72eb9f381c
commit e25ac5f686

View File

@@ -31,11 +31,10 @@ class KeystoneBasicTestCase(test.TestCase):
scenario = basic.KeystoneBasic()
mock_gen_name.return_value = "teeeest"
scenario._user_create = mock.MagicMock()
scenario.create_user(name_length=20, password="tttt",
**{"tenant_id": "id"})
scenario.create_user(name_length=20, password="tttt", tenant_id="id")
scenario._user_create.assert_called_once_with(name_length=20,
password="tttt",
**{"tenant_id": "id"})
tenant_id="id")
@mock.patch(KEYSTONE_UTILS + "generate_keystone_name")
def test_create_delete_user(self, mock_gen_name):
@@ -46,12 +45,11 @@ class KeystoneBasicTestCase(test.TestCase):
scenario._resource_delete = mock.MagicMock()
mock_gen_name.return_value = "teeeest"
scenario.create_delete_user(name_length=30, email="abcd",
**{"enabled": True})
scenario.create_delete_user(name_length=30, email="abcd", enabled=True)
scenario._user_create.assert_called_once_with(name_length=30,
email="abcd",
**{"enabled": True})
enabled=True)
scenario._resource_delete.assert_called_once_with(create_result)
@mock.patch(KEYSTONE_UTILS + "generate_keystone_name")
@@ -59,6 +57,6 @@ class KeystoneBasicTestCase(test.TestCase):
scenario = basic.KeystoneBasic()
mock_gen_name.return_value = "teeeest"
scenario._tenant_create = mock.MagicMock()
scenario.create_tenant(name_length=20, **{"enabled": True})
scenario.create_tenant(name_length=20, enabled=True)
scenario._tenant_create.assert_called_once_with(name_length=20,
**{"enabled": True})
enabled=True)