Closed Laura10101 closed 11 months ago
The endpoints expect PUT rather than PATCH to update objects. Additionally, the URL used by the tests to patch flat_rate_rules excluded the rule ID so requests were routed to the RuleList rather than the RuleDetail view which does not support PUT requests.
FAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_existent_tier_id - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_null_tier_rate - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_numeric_tier_rate - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_valid_secondary_rule_tier - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_existent_rule_id - assert 405 == 404 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_name - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_ordinal - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_ordinal - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_nulL_explainer - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_variable_name - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_flat_rate - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_flat_rate - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_negative_flat_rate - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_valid_flat_rate_rule - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_existent_rule_id - assert 405 == 404 FAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_name - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_ordinal - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_numeric_ordinal - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_nulL_explainer - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_variable_name - assert 405 == 400 FAILED rules_api/test_views.py::test_patch_valid_tiered_rate_rule - assert 405 == 200 FAILED rules_api/test_views.py::test_patch_rule_tier_with_non_existent_tier_id - assert 405 == 404