def test_cannot_allow_identifiers_longer_than_63_characters(self): id_validator = LXDIdentifier('validator') assert id_validator('i' * 63) with pytest.raises(ValueInvalid): id_validator('i' * 64)
def test_can_validate_identifiers_made_up_of_letters_digits_and_dashes( self): id_validator = LXDIdentifier('validator') assert id_validator('myidentifier01') assert id_validator('myidentifier-02-test')
def test_cannot_allow_identifiers_that_do_not_start_with_letters(self): id_validator = LXDIdentifier('validator') with pytest.raises(ValueInvalid): id_validator('42identifier')
def test_can_validate_a_basic_identifier(self): id_validator = LXDIdentifier('validator') assert id_validator('myidentifier')