Skip to content

Commit

Permalink
added aoi factory
Browse files Browse the repository at this point in the history
  • Loading branch information
nifedara committed Apr 2, 2024
1 parent 4aba08c commit f8d78da
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion backend/tests/factories.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import factory

from login.models import OsmUser
from core.models import Dataset
from core.models import Dataset, AOI

from django.contrib.gis.geos import GEOSGeometry


class OsmUserFactory(factory.django.DjangoModelFactory):
Expand All @@ -19,3 +21,12 @@ class Meta:
name = "Test Dataset"
created_by = factory.SubFactory(OsmUserFactory)
status = -1


class AoiFactory(factory.django.DjangoModelFactory):
class Meta:
model = AOI

geom = GEOSGeometry("POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))", srid=4326)
dataset = factory.SubFactory(DatasetFactory)
label_status = -1

0 comments on commit f8d78da

Please sign in to comment.