Esempio n. 1
0
    def setUp(self):

        Muncipality(name="Berlin").save()

        district = District(name="Mitte", muncipality=Muncipality.objects.get(name="Berlin"))
        district.save()

        place = Place(
            address="Unter den Linden 1",
            description="Brandenburger Tor",
            lat="-13",
            lon="52",
            identifier="A",
            active=False,
        )
        place.save()
        place.entities.add(district)
        place.save()
        self.place_id = place.pk
Esempio n. 2
0
    def setUp(self):
        a = Place(
            address='Unter den Linden 1',
            description='Brandenburger Tor',
            lat='-13',
            lon='52',
            identifier='ACB',
            active=False,
        )
        a.save()

        Muncipality(name='Berlin').save()

        d = District(
            name='Mitte',
            muncipality=Muncipality.objects.get(name='Berlin')
        )
        d.save()

        b = District.objects.get(name='Mitte')
        a.entities.add(b)
        a.save()
Esempio n. 3
0
File: tests.py Progetto: symptog/wbc
    def setUp(self):
        User.objects.create_superuser('admin', 'admin@example', 'admin')

        muncipality = Muncipality(name='Berlin')
        muncipality.save()

        district = District(name='Mitte')
        district.muncipality = muncipality
        district.save()

        process_type = ProcessType(name="ProcessType", description="description")
        process_type.save()

        process_step = ProcessStep(name="ProcessStep", description="description",
                         icon="abc", hover_icon="abc", order=1)
        process_step.process_type = process_type
        process_step.save()

        department = Department(name="Department")
        department.entity = muncipality
        department.save()

        a = Place(
            address='Unter den Linden 1',
            description='Brandenburger Tor',
            lat='-13',
            lon='52',
            identifier='A',
            active=False,
        )
        a.save()
        a.entities.add(district)
        a.save()
        self.place_id = a.pk

        now = datetime.datetime.now()
        p = Publication(
            process_step=process_step,
            description='description',
            place=a,
            begin=now,
            end=now + datetime.timedelta(days=3),
            department=department
        )
        p.save()
        self.publication_id = p.pk
Esempio n. 4
0
    def setUp(self):

        Muncipality(name='Berlin').save()

        district = District(name='Mitte',
                            muncipality=Muncipality.objects.get(name='Berlin'))
        district.save()

        place = Place(
            address='Unter den Linden 1',
            description='Brandenburger Tor',
            lat='-13',
            lon='52',
            identifier='A',
            active=False,
        )
        place.save()
        place.entities.add(district)
        place.save()
        self.place_id = place.pk