Skip to content

Commit

Permalink
Created tests in Django REST
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon-Budziak committed Sep 12, 2023
1 parent 1fe55d5 commit 8e10546
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Django/Group_3/3_Django_REST/api/tests.py

This file was deleted.

Empty file.
19 changes: 19 additions & 0 deletions Django/Group_3/3_Django_REST/api/tests/test_book_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from django.test import TestCase

from ..models import Author, Book


class BookModelTest(TestCase):
def setUp(self) -> None:
self.author = Author.objects.create(
first_name='test_name',
last_name='test_last_name'
)

self.book = Book.objects.create(
title='test_title',
author_id=self.author
)

def test_book_creation(self):
pass

0 comments on commit 8e10546

Please sign in to comment.