Example #1
0
 def test_validate_with_invalid_code(self):
     with raises(ValueError) as e:
         Country.validate('SomeUnknownCode')
     assert str(e.value) == (
         'Could not convert string to country code: SomeUnknownCode')
 def test_validate_with_invalid_code(self):
     with pytest.raises(ValueError) as e:
         Country.validate('SomeUnknownCode')
     assert str(e.value) == (
         'Could not convert string to country code: SomeUnknownCode'
     )
Example #3
0
 def test_validate_with_valid_codes(self, code):
     Country.validate(code)
 def test_validate_with_valid_codes(self, code):
     Country.validate(code)