from django.test import TestCase

from useful.tasks import call_management_command


class ManagementCommandTestCase(TestCase):
    """Test calling a management command as a Celery task"""
    def test_management_command(self):
        t = call_management_command.delay('validate')
        self.assertEquals(t.status, 'SUCCESS')

@@ -195,34 +195,23 @@
 ef test_
-management_command
+success
 (self):%0A
@@ -264,16 +264,16 @@
 idate')%0A
-
         
@@ -311,8 +311,160 @@
 CCESS')%0A
+%0A    def test_failure(self):%0A        t = call_management_command.delay('somethingrandomthatdoesntexist')%0A        self.assertEquals(t.status, 'FAILURE')%0A

Add failed management command test