Skip to content

Commit

Permalink
delete person test
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 19, 2023
1 parent 570c115 commit 0f4f6ec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apis_core/apis_entities/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

client = Client()
USER = {"username": "testuser", "password": "somepassword"}
BAHR = {"name": "Bahr", "first_name": "Hermann", "start_date_written": "1900"}


class EntitiesTestCase(TestCase):
Expand All @@ -28,8 +29,11 @@ def test_002_check_fixtures(self):
self.assertEqual(items, 2)

def test_003_create_person(self):
item, created = Person.objects.get_or_create(
**{"name": "Bahr", "first_name": "Hermann", "start_date_written": "1900"}
)
item, created = Person.objects.get_or_create(**BAHR)
self.assertTrue(created)
self.assertEqual(item.name, "Bahr")

def test_004_delete_person(self):
item, _ = Person.objects.get_or_create(**BAHR)
self.assertEqual(item.name, "Bahr")
item.delete()

0 comments on commit 0f4f6ec

Please sign in to comment.