def test_dsa_region(self): country = PublicsCountryFactory.build(name='xyz') instance = PublicsDSARegionFactory.build(area_name='xyz', country=country) self.assertEqual(str(instance), 'xyz - xyz') # Island (Iceland) country = PublicsCountryFactory.build(name='\xccsland') instance = PublicsDSARegionFactory.build(area_name='xyz', country=country) self.assertEqual(str(instance), '\xccsland - xyz')
def test_dsa_rate(self): country = PublicsCountryFactory.build(name='xyz') region = PublicsDSARegionFactory.build(area_name='xyz', country=country) instance = PublicsDSARateFactory.build(region=region) self.assertTrue(str(instance).startswith('xyz - xyz')) country = PublicsCountryFactory.build(name='\xccsland') region = PublicsDSARegionFactory.build(area_name='xyz', country=country) instance = PublicsDSARateFactory.build(region=region) self.assertTrue(str(instance).startswith('\xccsland - xyz'))