test: Use proper species for animals

This commit is contained in:
moanos [he/him] 2024-03-20 10:36:04 +01:00
parent c4a36f149e
commit b142f28bdf

View File

@ -22,9 +22,12 @@ class Command(BaseCommand):
adoption2 = baker.make(AdoptionNotice, name="Vermittung2", organization=rescue2) adoption2 = baker.make(AdoptionNotice, name="Vermittung2", organization=rescue2)
rat1 = baker.make(Animal, name="Rat1", adoption_notice=adoption1) cat = baker.make(Species, name="Katze")
rat2 = baker.make(Animal, name="Rat2", adoption_notice=adoption1) rat = baker.make(Species, name="Farbratte")
cat1 = baker.make(Animal, name="Cat1", adoption_notice=adoption1)
rat1 = baker.make(Animal, name="Rat1", adoption_notice=adoption1, species=rat)
rat2 = baker.make(Animal, name="Rat2", adoption_notice=adoption1, species=rat)
cat1 = baker.make(Animal, name="Cat1", adoption_notice=adoption2, species=cat)
User.objects.create_user('test', password='foobar') User.objects.create_user('test', password='foobar')
User.objects.create_superuser(username="admin", password="admin") User.objects.create_superuser(username="admin", password="admin")