def setUp(self):
        super().setUp()
        fixtures = Fixtures(verbose=False)
        self.person, self.item = fixtures.create_PersonIdentity_data()

        queryset = Version.objects.get_for_object(self.person)
        self.version_ids = queryset.values_list("pk", flat=True)
    def setUp(self):
        super().setUp()

        fixtures = Fixtures(verbose=False)
        # fixtures = Fixtures(verbose=True)
        self.car = fixtures.create_FactoryCar_data()

        queryset = Version.objects.get_for_object(self.car)
        self.version_ids = queryset.values_list("pk", flat=True)
    def setUp(self):
        super().setUp()
        fixtures = Fixtures(verbose=False)
        self.item1, self.item2 = fixtures.create_TemplateField_data()

        queryset = Version.objects.get_for_object(self.item1)
        self.version_ids1 = queryset.values_list("pk", flat=True)

        queryset = Version.objects.get_for_object(self.item2)
        self.version_ids2 = queryset.values_list("pk", flat=True)
    def setUp(self):
        unregister(Person)
        unregister(Car)
        unregister(Factory)
        revisions.register(Factory, follow=["building_ptr", "cars", "workers"])
        revisions.register(Car)
        revisions.register(Person, follow=["pets"])
        super().setUp()

        fixtures = Fixtures(verbose=False)
        self.factory = fixtures.create_Factory_reverse_relation_data()
        queryset = Version.objects.get_for_object(self.factory)
        self.version_ids = queryset.values_list("pk", flat=True)
Ejemplo n.º 5
0
    def setUp(self):
        super().setUp()

        self.item, self.fixtures = Fixtures(verbose=False).create_VariantModel_data()

        queryset = Version.objects.get_for_object(self.item)
        self.version_ids = queryset.values_list("pk", flat=True)
Ejemplo n.º 6
0
    def setUp(self):
        super().setUp()

        self.fixtures = Fixtures()
        self.user = User.objects.create_superuser("Test User",
                                                  "*****@*****.**",
                                                  "no password")
        self.client.force_login(self.user)
Ejemplo n.º 7
0
    def handle(self, *args, **options):
        """
        INFO: The django reloader will call this multiple times!
        We check RUN_MAIN, that will be set in django.utils.autoreload
        So we can skip the first migrate run.
        """
        if os.environ.get("RUN_MAIN"):
            self.verbose_call("diffsettings")  # , interactive=False, verbosity=1)

            self.verbose_call("migrate", run_syncdb=True, interactive=False, verbosity=1)
            self.verbose_call("showmigrations", verbosity=1)

            # insert all unittest data into database:
            Fixtures(verbose=True).create_all()

        self.verbose_call("runserver", use_threading=False, use_reloader=True, verbosity=2)
    def setUpTestData(cls):
        fixtures = Fixtures(verbose=False)
        cls.instance = fixtures.create_MigrationModel_data()

        queryset = Version.objects.get_for_object(cls.instance)
        cls.version_ids = list(queryset.values_list("pk", flat=True))
Ejemplo n.º 9
0
 def setUp(self):
     super().setUp()
     fixtures = Fixtures(verbose=False)
     self.item = fixtures.create_CustomModel_data()