Skip to content
Myr

Merge pull request #6592 from atatuzuner61/bug/6584

Before adoption: this commit came in with the history the project adopted, so no landing records it.

"TOO_EARLY" type definition for status code 425

authored by Ian Stapleton Cordasco · committed by GitHub · parents 1ddf014, ec84f2c · Browse files · 2 files+16 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+16 added−1 removed

  • tests:+15 added−0 removed
  • other:+1 added−1 removed

2 files+16 added−1 removed

modified:src/requests/status_codes.py+1 added-1 removed
77 unmodified lines
78 421: ("misdirected_request",),79 422: ("unprocessable_entity", "unprocessable"),80 423: ("locked",),81 424: ("failed_dependency", "dependency"),82 425: ("unordered_collection", "unordered"),82 425: ("unordered_collection", "unordered", "too_early"),83 426: ("upgrade_required", "upgrade"),84 428: ("precondition_required", "precondition"),85 429: ("too_many_requests", "too_many"),86 431: ("header_fields_too_large", "fields_too_large"),
42 unmodified lines
modified:tests/test_requests.py+15 added
2793 unmodified lines
2794 r = requests.get(httpbin("bytes/20"))2795 with pytest.raises(requests.exceptions.JSONDecodeError) as excinfo:2796 r.json()2797 assert excinfo.value.doc == r.text27982799 def test_status_code_425(self):2800 r1 = requests.codes.get("TOO_EARLY")2801 r2 = requests.codes.get("too_early")2802 r3 = requests.codes.get("UNORDERED")2803 r4 = requests.codes.get("unordered")2804 r5 = requests.codes.get("UNORDERED_COLLECTION")2805 r6 = requests.codes.get("unordered_collection")28062807 assert r1 == 4252808 assert r2 == 4252809 assert r3 == 4252810 assert r4 == 4252811 assert r5 == 4252812 assert r6 == 425