Skip to content

Commit

Permalink
add first test for model
Browse files Browse the repository at this point in the history
  • Loading branch information
shtalinberg committed Dec 12, 2018
1 parent b4fe0a9 commit 23da5cc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions actionslog/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

"""Model tests."""

from __future__ import unicode_literals

from django.contrib.auth.models import User
from django.test import TestCase
# from django.utils.encoding import force_text

from actionslog.models import LogAction


class ModelTestCase(TestCase):
"""This class defines the test suite for the bucketlist model."""

def setUp(self):
"""Define the test client and other test variables."""
self.user = User.objects.create(username="nerd") # ADD THIS LINE
self.status_msg = 'Reset password success'


def test_model_manager(self):
la_kwargs = {
'instance': self.user,
'user': self.user,
'action_info': {'info': self.status_msg},
}
LogAction.objects.create_log_action(**la_kwargs)

2 changes: 1 addition & 1 deletion tests/requirements.pip
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#django==1.11.17
django-jsonfield>=0.9.15
pytz>=2015.7
django-nose==1.4.2
django-nose==1.4.6
nose==1.3.7
selenium==2.48.0
coverage==4.5.2

0 comments on commit 23da5cc

Please sign in to comment.