def test_isocode_not_present(self): isocode = load_isocode({'foo': 'bar'}) self.assertIsNone(isocode, 'Should not load an isocode without iso code')
def test_isocode_too_long(self): isocode = load_isocode({'ISO 693-3 code': 'abcd'}) self.assertIsNone(isocode, 'Should not load an isocode with 4 characters')
def test_load_isocode(self): isocode = load_isocode({'ISO 693-3 code': 'abc'}) self.assertIsNotNone(isocode, 'Unable to load an iso code with 3 characters')