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' )
def test_validate_with_valid_codes(self, code): Country.validate(code)