Skip to content

Commit

Permalink
Try to fix unit tests: compare geom srid and types
Browse files Browse the repository at this point in the history
  • Loading branch information
justinefricou committed Nov 7, 2024
1 parent a7eca5e commit 60433f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions geotrek/trekking/tests/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1804,8 +1804,11 @@ def test_create_basic_trek(self):
self.assertEqual(Trek.objects.count(), 1)
trek = Trek.objects.get()
self.assertEqual(trek.eid, "be5851a9-87d4-467c-ba95-16d474480976")
self.assertEqual(trek.geom.ewkt, "SRID=2154;LINESTRING (973032.3522426573 6409775.480393637, 973028.3125000017 6409771.999999961)")
self.assertEqual(trek.parking_location.ewkt, "SRID=2154;POINT (973039.0930175973 6409777.794921431)")
self.assertEqual(trek.geom.srid, settings.SRID)
self.assertEqual(trek.geom.geom_type, 'LineString')
self.assertEqual(trek.geom.num_coords, 2)
self.assertEqual(trek.parking_location.srid, settings.SRID)
self.assertEqual(trek.parking_location.geom_type, 'Point')
self.assertEqual(trek.description, "Instructions 1\n\nhttps://test.com")
# TODO:
# - check attachments and their licenses
Expand Down

0 comments on commit 60433f2

Please sign in to comment.