Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Sep 4, 2024
1 parent 760e400 commit f9c4162
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions onadata/apps/api/tests/viewsets/test_entity_list_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,18 @@ def setUp(self):
# Create Entity for trees EntityList
trees_entity_list = EntityList.objects.get(name="trees")
OwnerRole.add(self.user, trees_entity_list)
Entity.objects.create(
entity_list=trees_entity_list,
json={
"species": "purpleheart",
"geometry": "-1.286905 36.772845 0 0",
"circumference_cm": 300,
"label": "300cm purpleheart",
},
uuid="dbee4c32-a922-451c-9df7-42f40bf78f48",
)

with self.captureOnCommitCallbacks(execute=True):
Entity.objects.create(
entity_list=trees_entity_list,
json={
"species": "purpleheart",
"geometry": "-1.286905 36.772845 0 0",
"circumference_cm": 300,
"label": "300cm purpleheart",
},
uuid="dbee4c32-a922-451c-9df7-42f40bf78f48",
)

def test_get_entity_list(self):
"""Returns a single EntityList"""
Expand Down

0 comments on commit f9c4162

Please sign in to comment.