예제 #1
0
    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')
예제 #2
0
    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'))