Coverage for books/tests/test_models.py: 100.00%

10 statements  

« prev     ^ index     » next       coverage.py v7.9.2, created at 2025-07-16 12:21 -0700

1from django.test import TestCase 

2 

3from accounts.tests.factories import UserFactory 

4 

5from .factories import BookFactory 

6 

7# from ..models import Book 

8 

9 

10class BookTests(TestCase): 

11 def setUp(self): 

12 self.user = UserFactory() 

13 self.book = BookFactory() 

14 

15 def test__str__(self): 

16 assert self.book.__str__() == self.book.title 1b

17 assert str(self.book) == self.book.title 1b