Skip to content

Commit

Permalink
💚 Add ordered on assertquerysetequal, test consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
LePetitTim committed Jan 31, 2023
1 parent 8ada5c9 commit d515002
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geotrek/maintenance/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_trails_property(self):
TrailFactory.create(paths=[p], name='trail_2')
infra = InfrastructureFactory.create(paths=[p])
intervention = InterventionFactory.create(target=infra)
self.assertQuerysetEqual(intervention.trails, ['trail_1', 'trail_2'], transform=str)
self.assertQuerysetEqual(intervention.trails, ['trail_1', 'trail_2'], ordered=False, transform=str)

def test_paths_property(self):
p_infra = PathFactory.create(geom=LineString((0, 0), (0, 10)))
Expand Down Expand Up @@ -315,7 +315,7 @@ def test_paths_property(self):
project.interventions.add(intervention_infra)
project.interventions.add(intervention_blade)
project.interventions.add(intervention_course)
self.assertQuerysetEqual(list(project.paths), [p_infra.name, p_signage.name], transform=str)
self.assertQuerysetEqual(list(project.paths), [p_infra.name, p_signage.name], ordered=False, transform=str)

def test_trails_property(self):
p_infra = PathFactory.create(geom=LineString((0, 0), (0, 10)))
Expand All @@ -336,4 +336,4 @@ def test_trails_property(self):
project.interventions.add(intervention_infra)
project.interventions.add(intervention_blade)
project.interventions.add(intervention_course)
self.assertQuerysetEqual(list(project.trails), ['trail_1', 'trail_2', 'trail_signage'], transform=str)
self.assertQuerysetEqual(list(project.trails), ['trail_1', 'trail_2', 'trail_signage'], ordered=False, transform=str)

0 comments on commit d515002

Please sign in to comment.