You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the payload items field is empty, it is returning 201 when it should be 400.
Example:
# Sets up a wrong maintenance window data
payload = {
"description": "my MW on switch 2",
"start": start.strftime(TIME_FMT),
"end": end.strftime(TIME_FMT),
"items": []
}
reflected on end-to-end test: tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_024_create_mw_on_switch_should_fail_items_empty
In the case where the payload does not have an items field, it is returning 500 when should be 400.
Example:
# Sets up a wrong maintenance window data
payload = {
"description": "my MW on switch 2",
"start": start.strftime(TIME_FMT),
"end": end.strftime(TIME_FMT)
}
reflected on end-to-end test:
tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_026_create_mw_on_switch_should_fail_no_items_field_on_payload
A not serializable JSON broke the application, and it should return a 415 error.
Example:
# Sets up a wrong maintenance window data
payload = {"a"}
reflected on end-to-end test:
tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_029_create_mw_on_switch_should_fail_wrong_payload
The text was updated successfully, but these errors were encountered:
* Use werkzeug Exception classes
Use werkzeug exception classes to return the correct error
codes.
Also raise a ValueError if no item is provided on creation
Fixes#43
* Fix return codes
Fix some return codes on update, delete and end maintenance.
Fix#44
* Upgrade versions and fix linter issues
* Fixed test error
* Do not allow items with empty list on update
Example:
# Sets up a wrong maintenance window data
payload = {
"description": "my MW on switch 2",
"start": start.strftime(TIME_FMT),
"end": end.strftime(TIME_FMT),
"items": []
}
reflected on end-to-end test: tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_024_create_mw_on_switch_should_fail_items_empty
In the case where the payload does not have an items field, it is returning 500 when should be 400.
Example:
# Sets up a wrong maintenance window data
payload = {
"description": "my MW on switch 2",
"start": start.strftime(TIME_FMT),
"end": end.strftime(TIME_FMT)
}
reflected on end-to-end test:
tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_026_create_mw_on_switch_should_fail_no_items_field_on_payload
Example:
# Sets up a wrong maintenance window data
payload = {"a"}
reflected on end-to-end test:
tests/test_e2e_15_maintenance.py::TestE2EMaintenance::test_029_create_mw_on_switch_should_fail_wrong_payload
The text was updated successfully, but these errors were encountered: