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 Jun 6, 2024
1 parent e08b2fe commit fbfa302
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion onadata/apps/logger/tests/models/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from onadata.apps.logger.models import Entity, EntityHistory, EntityList, Instance
from onadata.apps.main.tests.test_base import TestBase
from onadata.libs.utils.user_auth import get_user_default_project


class EntityTestCase(TestBase):
Expand All @@ -14,7 +15,8 @@ class EntityTestCase(TestBase):
def setUp(self):
super().setUp()
self.mocked_now = datetime(2023, 11, 8, 13, 17, 0, tzinfo=pytz.utc)
self.entity_list = EntityList.objects.first()
self.project = get_user_default_project(self.user)
self.entity_list = EntityList.objects.create(name="trees", project=self.project)

@patch("django.utils.timezone.now")
def test_creation(self, mock_now):
Expand Down

0 comments on commit fbfa302

Please sign in to comment.