Fixed tests for non-sqlite dbs
This commit is contained in:
@@ -134,18 +134,7 @@ def test_find_all_spools_including_archived(spools: Fixture):
|
|||||||
|
|
||||||
def test_find_all_spools_sort_asc(spools: Fixture):
|
def test_find_all_spools_sort_asc(spools: Fixture):
|
||||||
# Execute
|
# Execute
|
||||||
result = httpx.get(f"{URL}/api/v1/spool?sort=location:asc")
|
result = httpx.get(f"{URL}/api/v1/spool?sort=id:asc")
|
||||||
result.raise_for_status()
|
|
||||||
|
|
||||||
# Verify
|
|
||||||
spools_result = result.json()
|
|
||||||
assert len(spools_result) == 4
|
|
||||||
assert spools_result[3] == spools.spools[0]
|
|
||||||
|
|
||||||
|
|
||||||
def test_find_all_spools_sort_desc(spools: Fixture):
|
|
||||||
# Execute
|
|
||||||
result = httpx.get(f"{URL}/api/v1/spool?sort=location:desc")
|
|
||||||
result.raise_for_status()
|
result.raise_for_status()
|
||||||
|
|
||||||
# Verify
|
# Verify
|
||||||
@@ -154,6 +143,17 @@ def test_find_all_spools_sort_desc(spools: Fixture):
|
|||||||
assert spools_result[0] == spools.spools[0]
|
assert spools_result[0] == spools.spools[0]
|
||||||
|
|
||||||
|
|
||||||
|
def test_find_all_spools_sort_desc(spools: Fixture):
|
||||||
|
# Execute
|
||||||
|
result = httpx.get(f"{URL}/api/v1/spool?sort=id:desc")
|
||||||
|
result.raise_for_status()
|
||||||
|
|
||||||
|
# Verify
|
||||||
|
spools_result = result.json()
|
||||||
|
assert len(spools_result) == 4
|
||||||
|
assert spools_result[-1] == spools.spools[0]
|
||||||
|
|
||||||
|
|
||||||
def test_find_all_spools_limit_asc(spools: Fixture):
|
def test_find_all_spools_limit_asc(spools: Fixture):
|
||||||
# Execute
|
# Execute
|
||||||
result = httpx.get(f"{URL}/api/v1/spool?sort=id:asc&limit=2")
|
result = httpx.get(f"{URL}/api/v1/spool?sort=id:asc&limit=2")
|
||||||
|
|||||||
Reference in New Issue
Block a user