Skip to content

Commit

Permalink
✅ [#329] update object_history test
Browse files Browse the repository at this point in the history
  • Loading branch information
annashamray committed Aug 20, 2024
1 parent f71d8c5 commit 0078b72
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions src/objects/tests/v2/test_object_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,30 +301,35 @@ def test_history_object(self, m):

self.assertEqual(
data,
[
{
"index": 1,
"typeVersion": record1.version,
"data": record1.data,
"geometry": json.loads(record1.geometry.json),
"startAt": record1.start_at.isoformat(),
"endAt": record2.start_at.isoformat(),
"registrationAt": record1.registration_at.isoformat(),
"correctionFor": None,
"correctedBy": 2,
},
{
"index": 2,
"typeVersion": record2.version,
"data": record2.data,
"geometry": json.loads(record2.geometry.json),
"startAt": record2.start_at.isoformat(),
"endAt": None,
"registrationAt": date.today().isoformat(),
"correctionFor": 1,
"correctedBy": None,
},
],
{
"count": 2,
"next": None,
"previous": None,
"results": [
{
"index": 1,
"typeVersion": record1.version,
"data": record1.data,
"geometry": json.loads(record1.geometry.json),
"startAt": record1.start_at.isoformat(),
"endAt": record2.start_at.isoformat(),
"registrationAt": record1.registration_at.isoformat(),
"correctionFor": None,
"correctedBy": 2,
},
{
"index": 2,
"typeVersion": record2.version,
"data": record2.data,
"geometry": json.loads(record2.geometry.json),
"startAt": record2.start_at.isoformat(),
"endAt": None,
"registrationAt": date.today().isoformat(),
"correctionFor": 1,
"correctedBy": None,
},
],
},
)

# In the ticket https://github.com/maykinmedia/objects-api/issues/282 we discovered that updating an object \
Expand Down

0 comments on commit 0078b72

Please sign in to comment.