File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
tests/test_apis/test_api_prefix Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,14 @@ def response_constructor(
104104 """
105105
106106 response_object = {
107- identifier : {
108- "request_status" : status ,
109- "status_code" : code
110- }
107+ "identifier" : identifier ,
108+ "request_status" : status ,
109+ "status_code" : code
111110 }
112111
113112 if data is not None :
114- response_object [identifier ][ "data" ] = data
113+ response_object ["data" ] = data
115114 if message is not None :
116- response_object [identifier ][ "message" ] = message
115+ response_object ["message" ] = message
117116
118117 return response_object
Original file line number Diff line number Diff line change @@ -121,13 +121,13 @@ def test_create_multi_status(self):
121121 self .client .credentials (HTTP_AUTHORIZATION = 'Token ' + token )
122122 response = self .client .post ('/api/prefixes/create/' , data = data , format = 'json' )
123123 # 201: The prefix * was successfully created.
124- self .assertEqual (response .data [2 ]['TEST2' ][ ' status_code' ], 201 )
124+ self .assertEqual (response .data [2 ]['status_code' ], 201 )
125125
126126 # 400: Bad Request. The prefix * does not follow the naming rules for a prefix.
127- self .assertIn ('prefix' , response .data [0 ]['INVALID-PREFIX' ][ ' data' ])
127+ self .assertIn ('prefix' , response .data [0 ]['data' ])
128128
129129 # 409: Conflict. The prefix the requestor is attempting to create already exists.
130- self .assertIn ('prefix_name' , response .data [3 ]['TEST' ][ ' data' ])
130+ self .assertIn ('prefix_name' , response .data [3 ]['data' ])
131131
132132 self .assertEqual (response .status_code , 207 )
133133
You can’t perform that action at this time.
0 commit comments