wrote some tests
This commit is contained in:
parent
5a32c980ad
commit
cc16f0ad3a
4 changed files with 88 additions and 4 deletions
|
@ -1,3 +1,27 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
class AviaryTestCase(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
Aviary.objects.create(
|
||||||
|
description="Voliere 1",
|
||||||
|
condition="Offen",
|
||||||
|
last_ward_round="2021-01-01",
|
||||||
|
comment="Test",
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_aviary_description(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.description, "Voliere 1")
|
||||||
|
|
||||||
|
def test_aviary_condition(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.condition, "Offen")
|
||||||
|
|
||||||
|
def test_aviary_last_ward_round(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.last_ward_round, "2021-01-01")
|
||||||
|
|
||||||
|
def test_aviary_comment(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.comment, "Test")
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
class BirdTestCase(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
Bird.objects.create(
|
||||||
|
name="Vogel 1",
|
||||||
|
species="Art 1",
|
||||||
|
aviary=Aviary.objects.create(
|
||||||
|
description="Voliere 1",
|
||||||
|
condition="Offen",
|
||||||
|
last_ward_round="2021-01-01",
|
||||||
|
comment="Test",
|
||||||
|
),
|
||||||
|
date_of_birth="2020-01-01
|
||||||
|
|
|
@ -1,3 +1,27 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
class AviaryTestCase(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
Aviary.objects.create(
|
||||||
|
description="Voliere 1",
|
||||||
|
condition="Offen",
|
||||||
|
last_ward_round="2021-01-01",
|
||||||
|
comment="Test",
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_aviary_description(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.description, "Voliere 1")
|
||||||
|
|
||||||
|
def test_aviary_condition(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.condition, "Offen")
|
||||||
|
|
||||||
|
def test_aviary_last_ward_round(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.last_ward_round, "2021-01-01")
|
||||||
|
|
||||||
|
def test_aviary_comment(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.comment, "Test")
|
||||||
|
|
|
@ -1,3 +1,27 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
# Create your tests here.
|
# Write costs tests here
|
||||||
|
class AviaryTestCase(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
Aviary.objects.create(
|
||||||
|
description="Voliere 1",
|
||||||
|
condition="Offen",
|
||||||
|
last_ward_round="2021-01-01",
|
||||||
|
comment="Test",
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_aviary_description(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.description, "Voliere 1")
|
||||||
|
|
||||||
|
def test_aviary_condition(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.condition, "Offen")
|
||||||
|
|
||||||
|
def test_aviary_last_ward_round(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.last_ward_round, "2021-01-01")
|
||||||
|
|
||||||
|
def test_aviary_comment(self):
|
||||||
|
aviary = Aviary.objects.get(description="Voliere 1")
|
||||||
|
self.assertEqual(aviary.comment, "Test")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue