Skip to content

Commit

Permalink
update test comments & test case name properly
Browse files Browse the repository at this point in the history
  • Loading branch information
unclebean authored Oct 20, 2018
1 parent 6341519 commit 74237b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/dashboard/tests/test_dashboard_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ def test_create_user_action_with_cookie(mockUserAction):
@staticmethod
@patch('dashboard.utils.UserAction.objects')
def test_create_user_action_without_cookie(mockUserAction):
"""Test the giving utm* in cookie should store in DB."""
"""Test the giving utm* in cookie should store in DB as empty dict."""
request = RequestFactory().get('/login')
create_user_action(None, 'Login', request)
mockUserAction.create.assert_called_once_with(action='Login', metadata={}, user=None)

@staticmethod
@patch('dashboard.utils.UserAction.objects')
def test_create_user_action_campaign_not_json(mockUserAction):
"""Test the giving utm* in cookie should store in DB."""
def test_create_user_action_with_partial_cookie(mockUserAction):
"""Test the giving utm* in cookie should store partial utm in DB."""
request = RequestFactory().get('/login')
request.COOKIES['utm_campaign'] = 'test campaign'
create_user_action(None, 'Login', request)
Expand Down

0 comments on commit 74237b5

Please sign in to comment.