Skip to content

Commit

Permalink
added factory boy
Browse files Browse the repository at this point in the history
  • Loading branch information
nifedara committed Apr 2, 2024
1 parent 556c162 commit 1a9b419
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions backend/tests/factories.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import factory

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


class OsmUserFactory(factory.django.DjangoModelFactory):
class Meta:
model = OsmUser

username = "Test User"
osm_id = 123456


class DatasetFactory(factory.django.DjangoModelFactory):
class Meta:
model = Dataset

name = "Test Dataset"
created_by = factory.SubFactory(OsmUserFactory)
status = -1

0 comments on commit 1a9b419

Please sign in to comment.