spec: update api consistency
Align optimistic locking conflict payload, update websocket docs, and adjust tests.
This commit is contained in:
@@ -88,7 +88,11 @@ class TestOptimisticLocking:
|
||||
)
|
||||
|
||||
assert response.status_code == 409
|
||||
assert "conflict" in response.json().get("detail", "").lower() or "version" in response.json().get("detail", "").lower()
|
||||
detail = response.json().get("detail")
|
||||
assert isinstance(detail, dict)
|
||||
assert detail.get("error") == "conflict"
|
||||
assert detail.get("current_version") == 5
|
||||
assert detail.get("provided_version") == 1
|
||||
|
||||
def test_update_without_version_succeeds(self, client, admin_token, db):
|
||||
"""Test that update without version (for backward compatibility) still works."""
|
||||
|
||||
Reference in New Issue
Block a user