'Test that the command interface works. Ignore stderr for clean
test output.'

def test_command(self):

    with self.assertRaisesRegexp(CommandError, 'This    script    requires.*'):
        call_command('git_export', 'blah', 'blah', 'blah', stderr=StringIO.StringIO())
    with self.assertRaisesRegexp(CommandError, 'This    script    requires.*'):
        call_command('git_export', stderr=StringIO.StringIO())
    with self.assertRaisesRegexp(CommandError, unicode(GitExportError.URL_BAD)):
        call_command('git_export', 'foo/bar/baz', 'silly', stderr=StringIO.StringIO())
    with self.assertRaisesRegexp(CommandError, unicode(GitExportError.BAD_COURSE)):
        call_command('git_export', 'foo/bar:baz', 'silly', stderr=StringIO.StringIO())
