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)
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)
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)])
def test_city_edge(self): city_edge = CityEdgeFactory() self.assertEqual(str(city_edge), "City edge: {}".format(city_edge.city.name))