From e72b33422d81102c490c7302f261002c7e5a480e Mon Sep 17 00:00:00 2001 From: Peter Dudfield <34686298+peterdudfield@users.noreply.github.com> Date: Mon, 21 Aug 2023 12:14:39 +0100 Subject: [PATCH] Issue/order sites (#77) * make sure sites are ordered * add to tests * fix --- tests/test_read.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_read.py b/tests/test_read.py index 8e6e931..32548ad 100644 --- a/tests/test_read.py +++ b/tests/test_read.py @@ -38,7 +38,13 @@ def test_returns_all_sites(self, sites, db_session): assert len(out) == len(sites) - assert out[0] == sites[0] + site = [s for s in sites if s.site_uuid == out[0].site_uuid][0] + assert out[0] == site + + # check uuid is in order + assert out[1].site_uuid > out[0].site_uuid + assert out[2].site_uuid > out[1].site_uuid + assert out[3].site_uuid > out[2].site_uuid # check uuid is in order assert out[1].site_uuid > out[0].site_uuid