From b142f28bdf60198320b09143d1dcb882c6476d6f Mon Sep 17 00:00:00 2001 From: moanos Date: Wed, 20 Mar 2024 10:36:04 +0100 Subject: [PATCH] test: Use proper species for animals --- src/fellchensammlung/management/commands/populate_db.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/fellchensammlung/management/commands/populate_db.py b/src/fellchensammlung/management/commands/populate_db.py index 7280091..0b8aa36 100644 --- a/src/fellchensammlung/management/commands/populate_db.py +++ b/src/fellchensammlung/management/commands/populate_db.py @@ -22,9 +22,12 @@ class Command(BaseCommand): adoption2 = baker.make(AdoptionNotice, name="Vermittung2", organization=rescue2) - rat1 = baker.make(Animal, name="Rat1", adoption_notice=adoption1) - rat2 = baker.make(Animal, name="Rat2", adoption_notice=adoption1) - cat1 = baker.make(Animal, name="Cat1", adoption_notice=adoption1) + cat = baker.make(Species, name="Katze") + rat = baker.make(Species, name="Farbratte") + + 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_superuser(username="admin", password="admin")