Skip to content

Commit

Permalink
Add factory DepartmentSlaFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
Pithikos committed Sep 29, 2021
1 parent 37f0225 commit d579be0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion api/cases/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
CaseType,
EcjuQuery,
GoodCountryDecision,
DepartmentSla,
)
from api.queues.tests.factories import QueueFactory
from api.organisations.tests.factories import OrganisationFactory
from api.goodstype.tests.factories import GoodsTypeFactory
from api.staticdata.countries.factories import CountryFactory
from api.teams.tests.factories import TeamFactory
from api.teams.tests.factories import TeamFactory, DepartmentFactory
from api.users.tests.factories import GovUserFactory


Expand Down Expand Up @@ -66,6 +67,15 @@ class Meta:
model = Case


class DepartmentSlaFactory(factory.django.DjangoModelFactory):
sla_days = factory.Faker('pyint', min_value=0, max_value=30)
case = factory.SubFactory(CaseFactory)
department = factory.SubFactory(DepartmentFactory)

class Meta:
model = DepartmentSla


class CaseAssignmentFactory(factory.django.DjangoModelFactory):

case = factory.SubFactory(CaseFactory)
Expand Down

0 comments on commit d579be0

Please sign in to comment.