Beispiel #1
0
    def setUpCountriesRegionsSectors(self):
        self.sector_vocabulary = SectorVocabularyFactory()

        self.c1 = iati_factory.CountryFactory(code='AF', name='Afghanistan')
        self.c2 = iati_factory.CountryFactory(code='AL', name='Albania')
        self.r1 = iati_factory.RegionFactory(code='998',
                                             name='World-wide, unspecified')
        self.s1 = SectorFactory(code='15160',
                                name='sector A',
                                vocabulary=self.sector_vocabulary)
        self.s2 = SectorFactory(code='15161',
                                name='sector B',
                                vocabulary=self.sector_vocabulary)
        self.currency = iati_factory.CurrencyFactory(code='EUR')

        self.rc1 = iati_factory.ActivityRecipientCountryFactory.create(
            activity=self.activity, country=self.c1, percentage=None)

        self.rc2 = iati_factory.ActivityRecipientCountryFactory.create(
            activity=self.activity, country=self.c2, percentage=None)

        self.rr1 = iati_factory.ActivityRecipientRegionFactory.create(
            activity=self.activity, region=self.r1, percentage=None)

        self.rs1 = iati_factory.ActivitySectorFactory.create(
            activity=self.activity, sector=self.s1, percentage=None)

        self.rs2 = iati_factory.ActivitySectorFactory.create(
            activity=self.activity, sector=self.s2, percentage=None)
Beispiel #2
0
 def region(self):
     return iati_factory.RegionFactory()