Skip to content

Commit

Permalink
Merge pull request #26 from maykinmedia/feature/25-traits
Browse files Browse the repository at this point in the history
[#25] Add traits to factory
  • Loading branch information
svenvandescheur authored May 16, 2024
2 parents f937b93 + 7abe5c9 commit 6f25182
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions backend/src/openarchiefbeheer/zaken/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,28 @@ class ZaakFactory(factory.django.DjangoModelFactory):

class Meta:
model = Zaak

class Params:
with_expand = factory.Trait(
_expand={
"zaaktype": {
"url": "http://catalogue-api.nl/zaaktypen/111-111-111",
"selectielijst_procestype": {"nummer": 1},
},
"resultaat": {
"resultaattype": "http://catalogue-api.nl/catalogi/api/v1/resultaattypen/111-111-111",
"_expand": {
"resultaattype": {
"url": "http://catalogue-api.nl/catalogi/api/v1/resultaattypen/111-111-111",
"archiefactietermijn": "P1D",
}
},
},
}
)
with_related_zaken = factory.Trait(
relevante_andere_zaken=[
"http://zaken-api.nl/zaken/api/v1/zaken/111-111-111",
"http://zaken-api.nl/zaken/api/v1/zaken/222-222-222",
]
)

0 comments on commit 6f25182

Please sign in to comment.