Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Commit

Permalink
more travis debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed Jan 5, 2015
1 parent b8ec3a5 commit d445dd7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions goggles/warehouse/tests/test_forms.py
@@ -1,5 +1,6 @@
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.management import call_command

from goggles.warehouse.forms import ConversationActionForm

Expand Down Expand Up @@ -30,11 +31,12 @@ def test_form_actions(self):
form.handle_action('fake conversation')
form.do_import_job.assert_called_with('fake conversation')

# @mock.patch('goggles.warehouse.tasks.schedule_import_conversation.delay')
def test_do_import_job(self):
@mock.patch('goggles.warehouse.tasks.schedule_import_conversation.delay')
def test_do_import_job(self, mock_task):
call_command('migrate')
conversation = self.mk_conversation()
form = ConversationActionForm()
self.assertEqual(
form.do_import_job(conversation),
'Starting an import job for %s' % (conversation.name,))
# mock_task.assert_called_with(conversation.pk)
mock_task.assert_called_with(conversation.pk)

0 comments on commit d445dd7

Please sign in to comment.