from django.test import TestCase
from .models import Author, Publisher, Edition, Setting, Adventure


class AuthorTests(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)


class PublisherTests(TestCase):
    def test_create_author(self):
        wotc = Publisher.objects.create(name='Wizards of the Coast')
        self.assertEqual(Publisher.objects.first(), wotc)
        self.assertEqual(Publisher.objects.count(), 1)


class EditionTests(TestCase):
    def test_create_author(self):
        odandd = Edition.objects.create(name='OD&D')
        self.assertEqual(Edition.objects.first(), odandd)
        self.assertEqual(Edition.objects.count(), 1)


class SettingTests(TestCase):
    def test_create_author(self):
        fr = Setting.objects.create(name='Forgotten Realms')
        self.assertEqual(Setting.objects.first(), fr)
        self.assertEqual(Setting.objects.count(), 1)

from django.test import TestCase
from .models import Author, Publisher, Edition, Setting, Adventure


class AuthorTests(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)


class PublisherTests(TestCase):
    def test_create_author(self):
        wotc = Publisher.objects.create(name='Wizards of the Coast')
        self.assertEqual(Publisher.objects.first(), wotc)
        self.assertEqual(Publisher.objects.count(), 1)


class EditionTests(TestCase):
    def test_create_author(self):
        odandd = Edition.objects.create(name='OD&D')
        self.assertEqual(Edition.objects.first(), odandd)
        self.assertEqual(Edition.objects.count(), 1)

--- 
+++ 
@@ -21,3 +21,10 @@
         odandd = Edition.objects.create(name='OD&D')
         self.assertEqual(Edition.objects.first(), odandd)
         self.assertEqual(Edition.objects.count(), 1)
+
+
+class SettingTests(TestCase):
+    def test_create_author(self):
+        fr = Setting.objects.create(name='Forgotten Realms')
+        self.assertEqual(Setting.objects.first(), fr)
+        self.assertEqual(Setting.objects.count(), 1)
Add Setting model creation test
