예제 #1
0
    def setUp(self):
        self.intervention = InterventionFactory.create()
        self.project = ProjectFactory.create()
        self.project.interventions.add(self.intervention)
        self.project.interventions.add(InterventionFactory.create())

        infra = InfrastructureFactory.create()
        self.intervention.set_topology(infra)
        self.intervention.save()

        path = infra.paths.get()

        self.signagemgt = SignageManagementEdgeFactory.create(no_path=True)
        self.signagemgt.add_path(path, start=0.3, end=0.7)
        self.workmgt = WorkManagementEdgeFactory.create(no_path=True)
        self.workmgt.add_path(path, start=0.3, end=0.7)
        self.competencemgt = CompetenceEdgeFactory.create(no_path=True)
        self.competencemgt.add_path(path, start=0.3, end=0.7)

        self.cityedge = CityEdgeFactory.create(no_path=True)
        self.cityedge.add_path(path, start=0.3, end=0.7)
        self.districtedge = DistrictEdgeFactory.create(no_path=True)
        self.districtedge.add_path(path, start=0.3, end=0.7)
        self.restricted = RestrictedAreaEdgeFactory.create(no_path=True)
        self.restricted.add_path(path, start=0.3, end=0.7)
예제 #2
0
    def setUp(self):
        self.intervention = InterventionFactory.create()
        self.project = ProjectFactory.create()
        self.project.interventions.add(self.intervention)
        self.project.interventions.add(InterventionFactory.create())

        infra = InfrastructureFactory.create()
        self.intervention.set_infrastructure(infra)
        self.intervention.save()

        path = infra.paths.get()

        self.signagemgt = SignageManagementEdgeFactory.create(no_path=True)
        self.signagemgt.add_path(path, start=0.3, end=0.7)
        self.workmgt = WorkManagementEdgeFactory.create(no_path=True)
        self.workmgt.add_path(path, start=0.3, end=0.7)
        self.competencemgt = CompetenceEdgeFactory.create(no_path=True)
        self.competencemgt.add_path(path, start=0.3, end=0.7)

        self.cityedge = CityEdgeFactory.create(no_path=True)
        self.cityedge.add_path(path, start=0.3, end=0.7)
        self.districtedge = DistrictEdgeFactory.create(no_path=True)
        self.districtedge.add_path(path, start=0.3, end=0.7)
        self.restricted = RestrictedAreaEdgeFactory.create(no_path=True)
        self.restricted.add_path(path, start=0.3, end=0.7)
예제 #3
0
    def setUp(self):
        infra = InfrastructureFactory.create()
        self.intervention = InterventionFactory.create(target=infra)
        self.project = ProjectFactory.create()
        self.project.interventions.add(self.intervention)
        self.project.interventions.add(InterventionFactory.create())

        path = infra.paths.get()

        self.signagemgt = SignageManagementEdgeFactory.create(paths=[(path, 0.3, 0.7)])
        self.workmgt = WorkManagementEdgeFactory.create(paths=[(path, 0.3, 0.7)])
        self.competencemgt = CompetenceEdgeFactory.create(paths=[(path, 0.3, 0.7)])

        self.cityedge = CityEdgeFactory.create(paths=[(path, 0.3, 0.7)])
        self.districtedge = DistrictEdgeFactory.create(paths=[(path, 0.3, 0.7)])
        self.restricted = RestrictedAreaEdgeFactory.create(paths=[(path, 0.3, 0.7)])
예제 #4
0
 def test_district_edge(self):
     district_edge = DistrictEdgeFactory()
     self.assertEqual(
         str(district_edge),
         "District edge: {}".format(district_edge.district.name))