From ce84fc86ae051d7b52eca66acc3af1defa4e5e2f Mon Sep 17 00:00:00 2001 From: Henddher Pedroza Date: Wed, 16 Oct 2019 21:14:01 -0400 Subject: [PATCH] Increase coverage for validatorfuncs.lock(). --- evennia/utils/tests/test_validatorfuncs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/evennia/utils/tests/test_validatorfuncs.py b/evennia/utils/tests/test_validatorfuncs.py index 9a434d0347..ed89aab375 100644 --- a/evennia/utils/tests/test_validatorfuncs.py +++ b/evennia/utils/tests/test_validatorfuncs.py @@ -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'))