I don't think this test is doing the right thing: It's invoking call_command directly, so the assertRaisesRegexp has no chance to check the result.  assertRaisesRegexp can be used as a context manager, just as assertRaises has been on line 58.  But maybe you won't need the assertRaises(SystemExit) if you change this?  It's strange to see two nested assertRaises.