mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 21:17:17 +02:00
Increase coverage for validatorfuncs.lock().
This commit is contained in:
parent
d2d551cd11
commit
00352e29fe
1 changed files with 7 additions and 1 deletions
|
|
@ -140,6 +140,12 @@ class TestValidatorFuncs(TestCase):
|
|||
self.assertEqual(l, validatorfuncs.lock(l))
|
||||
|
||||
def test_lock_raises_ValueError(self):
|
||||
for l in [';;;', '', ':', ':::', ';:;:']:
|
||||
for l in [';;;', '', ':', ':::', ';:;:', 'x:', ':y']:
|
||||
with self.assertRaises(ValueError):
|
||||
validatorfuncs.lock(l)
|
||||
with self.assertRaises(ValueError):
|
||||
validatorfuncs.lock('view:',
|
||||
access_options=())
|
||||
with self.assertRaises(ValueError):
|
||||
validatorfuncs.lock('view:',
|
||||
access_options=('view'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue