Skip to content

Commit

Permalink
✅ update tests with has_geometry field
Browse files Browse the repository at this point in the history
  • Loading branch information
annashamray committed Nov 22, 2021
1 parent 6cd680d commit 34e4244
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/objecttypes/tests/v1/test_objecttype_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_get_objecttypes(self):
"labels": object_type.labels,
"createdAt": "2020-01-01",
"modifiedAt": "2020-01-01",
"hasGeometry": object_type.has_geometry,
"versions": [
f"http://testserver{reverse('objectversion-detail', args=[object_type.uuid, object_version.version])}"
],
Expand Down Expand Up @@ -87,6 +88,7 @@ def test_create_objecttype(self):
"providerOrganization": "tree provider",
"documentationUrl": "http://example.com/doc/trees",
"labels": {"key1": "value1"},
"hasGeometry": False,
}

response = self.client.post(url, data)
Expand All @@ -113,6 +115,7 @@ def test_create_objecttype(self):
self.assertEqual(object_type.labels, {"key1": "value1"})
self.assertEqual(object_type.created_at, date(2020, 1, 1))
self.assertEqual(object_type.modified_at, date(2020, 1, 1))
self.assertEqual(object_type.has_geometry, False)

def test_update_objecttype(self):
object_type = ObjectTypeFactory.create(
Expand Down
1 change: 1 addition & 0 deletions src/objecttypes/tests/v2/test_objecttype_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_get_objecttypes(self):
"labels": object_type.labels,
"createdAt": "2020-01-01",
"modifiedAt": "2020-01-01",
"hasGeometry": object_type.has_geometry,
"versions": [
f"http://testserver{reverse('objectversion-detail', args=[object_type.uuid, object_version.version])}"
],
Expand Down

0 comments on commit 34e4244

Please sign in to comment.