Skip to content

Commit

Permalink
Issue/order sites (#77)
Browse files Browse the repository at this point in the history
* make sure sites are ordered

* add to tests

* fix
  • Loading branch information
peterdudfield authored Aug 21, 2023
1 parent 3036014 commit e72b334
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e72b334

Please sign in to comment.