mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-23 02:08:47 +02:00
KeyInfo: prevent read_only usage with can_disable, remove_value, absent_value, default, or required (#265)
* Prevent read_only usage with can_disable, remove_value, absent_value, default, or required. * Add test.
This commit is contained in:
parent
84009262d0
commit
2ea1fef535
2 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,10 @@ def test_key_info_errors():
|
|||
KeyInfo(read_only=True, write_only=True)
|
||||
assert exc.value.args[0] == 'read_only and write_only cannot be used at the same time'
|
||||
|
||||
with pytest.raises(ValueError) as exc:
|
||||
KeyInfo(read_only=True, default=0)
|
||||
assert exc.value.args[0] == 'read_only can not be combined with can_disable, remove_value, absent_value, default, or required'
|
||||
|
||||
|
||||
SPLIT_PATHS = [
|
||||
('', [], ''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue