From 7e63af0c4e10687513bd0cf527e6151dd94e5589 Mon Sep 17 00:00:00 2001 From: Marek Denis Date: Mon, 16 Mar 2015 10:00:52 +0100 Subject: [PATCH] Clean arguments in test_federation.*.test_create() This applies to test_federation.IdentityProviderTests.test_create() and test_federation.MappingTests.test_create() Change-Id: Ie88c959626520fcec4ee64ffc73a8fc845c5a6d3 --- .../tests/unit/v3/test_federation.py | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/keystoneclient/tests/unit/v3/test_federation.py b/keystoneclient/tests/unit/v3/test_federation.py index 2a4abc4ef..e76780ba8 100644 --- a/keystoneclient/tests/unit/v3/test_federation.py +++ b/keystoneclient/tests/unit/v3/test_federation.py @@ -71,14 +71,9 @@ class IdentityProviderTests(utils.TestCase, utils.CrudTests): self.assertRaises(TypeError, getattr(self.manager, f_name), *args) - def test_create(self, ref=None, req_ref=None): - ref = ref or self.new_ref() - - # req_ref argument allows you to specify a different - # signature for the request when the manager does some - # conversion before doing the request (e.g. converting - # from datetime object to timestamp string) - req_ref = (req_ref or ref).copy() + def test_create(self): + ref = self.new_ref() + req_ref = ref.copy() req_ref.pop('id') self.stub_entity('PUT', entity=ref, id=ref['id'], status_code=201) @@ -108,16 +103,11 @@ class MappingTests(utils.TestCase, utils.CrudTests): uuid.uuid4().hex]) return kwargs - def test_create(self, ref=None, req_ref=None): - ref = ref or self.new_ref() + def test_create(self): + ref = self.new_ref() manager_ref = ref.copy() mapping_id = manager_ref.pop('id') - - # req_ref argument allows you to specify a different - # signature for the request when the manager does some - # conversion before doing the request (e.g. converting - # from datetime object to timestamp string) - req_ref = (req_ref or ref).copy() + req_ref = ref.copy() self.stub_entity('PUT', entity=req_ref, id=mapping_id, status_code=201)