add test for properties
This commit is contained in:
@ -392,7 +392,20 @@ def test_requires_transitive_hidden_disabled_multiple():
|
||||
except PropertiesOptionError as err:
|
||||
props = err.proptype
|
||||
assert set(props) == {'disabled', 'hidden'}
|
||||
raises(RequirementError, "api.option('ip_address_service_web').value.get()")
|
||||
req = None
|
||||
try:
|
||||
api.option('ip_address_service_web').value.get()
|
||||
except RequirementError as err:
|
||||
req = err
|
||||
assert req, "ip_address_service_web should raise RequirementError"
|
||||
assert str(req) == str(_('cannot access to option "{}" because required option "{}" has {} {}').format('ip_address_service_web', 'activate_service_web', 'property', '"disabled"'))
|
||||
api.permissive.set(frozenset())
|
||||
try:
|
||||
api.option('ip_address_service_web').value.get()
|
||||
except RequirementError as err:
|
||||
req = err
|
||||
assert req, "ip_address_service_web should raise RequirementError"
|
||||
assert str(req) == str(_('cannot access to option "{}" because required option "{}" has {} {}').format('ip_address_service_web', 'activate_service_web', 'properties', '"disabled" and "hidden"'))
|
||||
|
||||
|
||||
def test_requires_not_transitive():
|
||||
|
Reference in New Issue
Block a user