diff options
author | Marek Denis <marek.denis@cern.ch> | 2015-03-16 10:00:52 +0100 |
---|---|---|
committer | Steve Martinelli <stevemar@ca.ibm.com> | 2015-03-18 15:40:16 +0000 |
commit | 7e63af0c4e10687513bd0cf527e6151dd94e5589 (patch) | |
tree | 6f8444becd967e73c584a2353c98002831986792 | |
parent | cfad7da20e189b691cdc85cb3b18ccd7a004d9c8 (diff) | |
download | python-keystoneclient-7e63af0c4e10687513bd0cf527e6151dd94e5589.tar.gz |
Clean arguments in test_federation.*.test_create()
This applies to test_federation.IdentityProviderTests.test_create() and
test_federation.MappingTests.test_create()
Change-Id: Ie88c959626520fcec4ee64ffc73a8fc845c5a6d3
-rw-r--r-- | keystoneclient/tests/unit/v3/test_federation.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/keystoneclient/tests/unit/v3/test_federation.py b/keystoneclient/tests/unit/v3/test_federation.py index 2a4abc4..e76780b 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) |