

def generate_fixture(self, fixture, error=False, **kwargs):
    stdout = StringIO()
    stderr = StringIO()
    run = (lambda : call_command('generate_fixture', fixture, stdout=stdout, stderr=stderr, **kwargs))
    if error:
        self.assertRaises(SystemExit, run)
    else:
        run()
    return (stdout.getvalue(), stderr.getvalue())

dataset/ETHPy150Open alex/django-fixture-generator/fixture_generator/tests/tests.py ManagementCommandTests.generate_fixture/original