# Path: server/adventures/models/author.py
# class Author(models.Model, TimestampMixin, DescriptionNotesMixin):
#     """
#     Model for the author.
#     """
# 
#     name = models.CharField(max_length=128)


from django.test import TestCase
from ..author import Author
# pylint: disable=missing-docstring


class AuthorTestCase(TestCase):
    def test_create_author(self):
        gygax = Author.objects.create(name='Gary Gygax')
        self.assertEqual(Author.objects.first(), gygax)

# Path: server/adventures/models/author.py
# class Author(models.Model, TimestampMixin, DescriptionNotesMixin):
#     """
#     Model for the author.
#     """
# 
#     name = models.CharField(max_length=128)


# Path: server/adventures/models/tests/author.py
from django.test import TestCase
from ..author import Author

# pylint: disable=missing-docstring


class AuthorTestCase(TestCase):
    def test_create_author(self):
        gygax = Author.objects.create(name='Gary Gygax')
        self.assertEqual(Author.objects.first(), gygax)

        self.assertEqual(Author.objects.count(), 1)