def test_country_code_length(self):
        p = Prefix()
        p.prefix = '1.3.3.0/24'
        p.type = 'assignment'
        p.status = 'assigned'
        # try to input one character - should fail - this will be a INSERT operation
        p.country = 'a'
        with self.assertRaisesRegexp(NipapValueError, 'Please enter a two letter country code according to ISO 3166-1 alpha-2'):
            p.save()

        # try to input one character - should fail - this will be an UPDATE operation
        p.country = 'a'
        with self.assertRaisesRegexp(NipapValueError, 'Please enter a two letter country code according to ISO 3166-1 alpha-2'):
            p.save()

        # try to input three character - should fail
        p.country = 'aaa'
        with self.assertRaisesRegexp(NipapValueError, 'Please enter a two letter country code according to ISO 3166-1 alpha-2'):
            p.save()

        # try to input a number character - should fail
        p.country = 'a1'
        with self.assertRaisesRegexp(NipapValueError, 'Please enter a two letter country code according to ISO 3166-1 alpha-2'):
            p.save()

        # try to input two character - should succeed
        p.country = 'se'
        p.save()

        # output should be capitalized
        self.assertEqual('SE', p.country)
Decode all the camera-specific MakerNote formats
dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipaptest.py/TestCountryCodeValue.test_country_code_length--crossover with--dataset/ETHPy150Open ianare/exif-py/exifread/classes.py/ExifHeader.decode_maker_note