API Tests - Negative tests fail for the wrong reason

Bug #1443979 reported by Malini Kamalambal
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Poppy
Confirmed
Medium
Unassigned

Bug Description

We have a lot of negative tests under https://github.com/stackforge/poppy/blob/master/tests/api/services/data_create_service_negative.json & https://github.com/stackforge/poppy/blob/master/tests/api/services/data_patch_service_negative.json.
The tests validate for a HTTP 400 response code, but not the json response.
As a result we have tests that get back a 400 for missing request_url, origin rules etc., whereas the test is supposed to fail for other reason.

Tags: apitests
Revision history for this message
Amit Gandhi (amit-gandhi) wrote :

is this still an issue?

Changed in poppy:
importance: Undecided → Medium
Revision history for this message
Amit Gandhi (amit-gandhi) wrote :

malini says it is still an issue

15:34 malini: we validate for 400s on the negative tests
15:34 malini: But we had a lot of code changes & now the tests get 400 due to different reasons

Changed in poppy:
status: New → Confirmed
Revision history for this message
Malini Kamalambal (malini-pk) wrote :

todo: Add validation for the resp.json() in case of 400s - make sure the response matches the scenario

tags: added: apitests
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.