v3 test utils, don't modify input parameter
As mentioned in https://review.openstack.org/#/c/61046/ for test_update, we should not modify the input req_ref in test_create instead we should make a copy Change-Id: I649433596a3ebbf2133eb724f09eb4bd470b7cdd
This commit is contained in:
@@ -193,7 +193,7 @@ class CrudTests(object):
|
|||||||
# signature for the request when the manager does some
|
# signature for the request when the manager does some
|
||||||
# conversion before doing the request (e.g converting
|
# conversion before doing the request (e.g converting
|
||||||
# from datetime object to timestamp string)
|
# from datetime object to timestamp string)
|
||||||
req_ref = req_ref or ref.copy()
|
req_ref = (req_ref or ref).copy()
|
||||||
req_ref.pop('id')
|
req_ref.pop('id')
|
||||||
|
|
||||||
self.stub_entity(httpretty.POST, entity=req_ref, status=201)
|
self.stub_entity(httpretty.POST, entity=req_ref, status=201)
|
||||||
|
Reference in New Issue
Block a user