Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions git-reader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def monitor_changes(
):
if _since and _expected > 0 and _expected < _since:
raise HTTPException(
status_code=400,
status_code=206,
detail="_expected must be superior to _since if both are provided",
)

Expand Down Expand Up @@ -713,7 +713,7 @@ def collection_changeset(
):
if _since and _expected > 0 and _expected < _since:
raise HTTPException(
status_code=400,
status_code=206,
detail="_expected must be superior to _since if both are provided",
)

Expand Down
4 changes: 2 additions & 2 deletions git-reader/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def test_monitor_changes_view_filtered_bad_since(api_client):
resp = api_client.get(
"/v2/buckets/monitor/collections/changes/changeset?_since=223456789&_expected=123456789"
)
assert resp.status_code == 400
assert resp.status_code == 206


def test_monitor_changes_negative_values(api_client):
Expand Down Expand Up @@ -491,7 +491,7 @@ def test_changeset_bad_since(api_client, since):
resp = api_client.get(
f"/v2/buckets/main/collections/password-rules/changeset?_since={since}&_expected=123456789"
)
assert resp.status_code in (400, 422)
assert resp.status_code in (206, 422)


@pytest.mark.parametrize("_expected", ["", "-1", "abc", '"42"'])
Expand Down
Loading