Skip to content

Commit

Permalink
added Feedback factory
Browse files Browse the repository at this point in the history
  • Loading branch information
nifedara committed Apr 2, 2024
1 parent af30aca commit 450db06
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion backend/tests/factories.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import factory

from login.models import OsmUser
from core.models import Dataset, AOI, Label, Model, Training
from core.models import Dataset, AOI, Label, Model, Training, Feedback


class OsmUserFactory(factory.django.DjangoModelFactory):
Expand Down Expand Up @@ -61,3 +61,16 @@ class Meta:
created_by = factory.SubFactory(OsmUserFactory)
epochs = 3
batch_size = 24


class FeedbackFactory(factory.django.DjangoModelFactory):

class Meta:
model = Feedback

geom = "POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))"
training = factory.SubFactory(TrainingFactory)
zoom_level = 19
feedback_type = "TP"
user = factory.SubFactory(OsmUserFactory)
source_imagery = "https://test_data/hotosm/fAIr/"

0 comments on commit 450db06

Please sign in to comment.