def handle(self, fixture, **options):
        fixtures = get_available_fixtures(settings.INSTALLED_APPS)
        fixture = fixtures[tuple(fixture.rsplit(".", 1))]
        requirements, models = calculate_requirements(fixtures, fixture)

        # fetch the projects test runner class
        runner_class = get_runner(settings)

        FixtureRunner = type("FixtureRunner", (GeneratingSuiteRunner, runner_class), {})
        runner = FixtureRunner(requirements, models, options)
        runner.run_tests()
 def handle(self, *labels, **options):
     fixtures = get_available_fixtures(settings.INSTALLED_APPS)
     for fixture in fixtures.itervalues():
         if not isinstance(fixture.export, basestring):
             continue
         print fixture
         app = get_app(fixture.app)
         destdir = os.path.dirname(app.__file__)
         if app.__file__.rsplit('.', 1)[0].endswith("__init__"):
             destdir = os.path.dirname(destdir)
         destdir = os.path.join(destdir, "fixtures")
         call_command("generate_fixture", fixture.label, prefix=fixture.export, dest_dir=destdir, **options)