示例#1
0
 def test_codelist_name(self):
     """
     Test retrieving a codelist name.
     """
     sector = Sector.objects.create(project=self.project, sector_code='140')
     name = codelist_name(CodelistSector, sector, 'sector_code', version='16')
     self.assertEqual(name, '140')
示例#2
0
 def test_codelist_name(self):
     """
     Test retrieving a codelist name.
     """
     sector = Sector.objects.create(project=self.project, sector_code='140')
     name = codelist_name(CodelistSector, sector, 'sector_code', version='16')
     self.assertEqual(name, '140')
 def currency_label(self):
     return codelist_name(Currency, self, "currency")
示例#4
0
 def currency_label(self):
     return codelist_name(Currency, self, 'currency')
示例#5
0
 def iati_currency(self):
     if self.currency:
         return codelist_name(Currency, self, 'currency')
     else:
         return codelist_name(Currency, self.project, 'currency')
示例#6
0
 def iati_currency(self):
     if self.currency:
         return codelist_name(Currency, self, 'currency')
     else:
         return codelist_name(Currency, self.project, 'currency')