Skip to content

Commit

Permalink
🗃️ [#315] Removed migration file for objecttype field in objectrecord…
Browse files Browse the repository at this point in the history
… model
  • Loading branch information
ErhanCitil committed Jun 6, 2023
1 parent 055f40b commit 1af1c11
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 37 deletions.
18 changes: 0 additions & 18 deletions src/objects/core/migrations/0028_objecttype__version.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/objects/tests/v1/test_auth_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def test_search_with_fields_auth(self):
fields={"1": ["url", "type", "record__geometry"]},
)
record = ObjectRecordFactory.create(
geometry=Point(4.905289, 52.369918),
geometry=Point(52.369918, 4.905289),
object__object_type=self.object_type,
data={"name": "some"},
version=1,
Expand Down
2 changes: 1 addition & 1 deletion src/objects/tests/v1/test_object_api_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_retrieve_with_selected_fields(self):
"record": {
"geometry": {
"type": "Point",
"coordinates": [4.910649523925713, 52.37240093589432],
"coordinates": [52.37240093589432, 4.910649523925713],
},
},
},
Expand Down
33 changes: 17 additions & 16 deletions src/objects/tests/v2/test_auth_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def test_search_with_fields_auth(self):
fields={"1": ["url", "type", "record__geometry"]},
)
record = ObjectRecordFactory.create(
geometry=Point(4.905289, 52.369918),
geometry=Point(52.369918, 4.905289),
object__object_type=self.object_type,
data={"name": "some"},
version=1,
Expand All @@ -418,18 +418,19 @@ def test_search_with_fields_auth(self):
)

self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(
response.json()["results"],
[
{
"url": f"http://testserver{reverse('object-detail', args=[record.object.uuid])}",
"type": self.object_type.url,
"record": {
"geometry": {
"type": "Point",
"coordinates": [4.905289, 52.369918],
}
},
}
],
)
# self.assertEqual(
# response.json()["results"],
# [
# {
# "url": f"http://testserver{reverse('object-detail', args=[record.object.uuid])}",
# "type": self.object_type.url,
# "record": {
# "geometry": {
# "type": "Point",
# "coordinates": [4.905289, 52.369918],
# }
# },
# }
# ],
# )
assert False, record
2 changes: 1 addition & 1 deletion src/objects/tests/v2/test_object_api_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_retrieve_with_selected_fields(self):
"record": {
"geometry": {
"type": "Point",
"coordinates": [4.910649523925713, 52.37240093589432],
"coordinates": [52.37240093589432, 4.910649523925713],
},
},
},
Expand Down

0 comments on commit 1af1c11

Please sign in to comment.