Files
python-tdd/src/apps/dashboard/tests/unit/test_models.py

14 lines
353 B
Python
Raw Normal View History

from django.test import SimpleTestCase
from apps.dashboard.models import Line
class SimpleLineModelTest(SimpleTestCase):
def test_default_text(self):
line = Line()
self.assertEqual(line.text, "")
def test_string_representation(self):
line = Line(text="sample text")
self.assertEqual(str(line), "sample text")