Skip to content

Commit 8bf633c

Browse files
Updated unit tests
1 parent 194515a commit 8bf633c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

portfolio/tests.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import tempfile
22
from django.test import TestCase
3-
from .models import Hero
3+
from .models import Hero, About
44

55

66
class HeroModelUnitTestCase(TestCase):
@@ -15,3 +15,16 @@ def setUp(self):
1515
def test_hero_model(self):
1616
data = self.hero
1717
self.assertIsInstance(data, Hero)
18+
19+
20+
class AboutModelUnitTestCase(TestCase):
21+
def setUp(self):
22+
self.about = About.objects.create(
23+
title='Lorem ipsum dolor sit amet',
24+
description='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt quis odio id.',
25+
icon='settings'
26+
)
27+
28+
def test_about_model(self):
29+
data = self.about
30+
self.assertIsInstance(data, About)

0 commit comments

Comments
 (0)