def test_asn(self): model = FullModel() model.asn = 42 assert 42 == model.asn model.full_clean() with pytest.raises(ValidationError): model.asn = 'invalid' model.full_clean()
def test_mac(self): model = FullModel() model.mac = 'Ff:00:00:12:34:56' model.full_clean() assert 'Ff:00:00:12:34:56' == model.mac with pytest.raises(ValidationError): model.mac = 'invalid' model.full_clean()
def test_blank(self): model = FullModel() model.full_clean()