Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Djordje Atlialp committed Jan 21, 2020
1 parent 6c287c1 commit f044d4a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Expand Up @@ -2,6 +2,9 @@
branch = true
source =
django_sonic_screwdriver
omit =
manage.py
django_sonic_screwdriver/apps/**/manage.py

[report]
exclude_lines =
Expand Down
13 changes: 13 additions & 0 deletions tests/test_model_comment.py
@@ -0,0 +1,13 @@
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase

from django_sonic_screwdriver.apps.admin_comments.models import Comment


class CommentTest(TestCase):
def test_str_repr(self):
content_type = ContentType.objects.first()
comment = Comment.objects.create(
comment="Test", object_id="123", content_type=content_type
)
self.assertEqual(str(comment), f"{content_type} - {comment.object_id}")

0 comments on commit f044d4a

Please sign in to comment.