Test tag error claim of #2139

This commit is contained in:
Griatch 2020-05-18 20:38:04 +02:00
parent ece9dd6b1d
commit 935c2c6eff

View file

@ -175,6 +175,16 @@ class TestLockfuncs(EvenniaTest):
self.assertEqual(True, lockfuncs.objtag(None, self.obj2, "test2", "category1"))
self.assertEqual(False, lockfuncs.objtag(None, self.obj2, "test2"))
def test_traverse_taglock(self):
self.obj2.tags.add("test1", "category1")
self.exit.locks.add("traverse:tag(test1,category1)")
self.assertEqual(self.exit.access(self.obj2, "traverse"), True)
def test_traverse_taglock_fail(self):
self.obj2.tags.add("test1") # missing the category
self.exit.locks.add("traverse:tag(test1,category1)")
self.assertEqual(self.exit.access(self.obj2, "traverse"), False)
def test_inside_holds(self):
self.assertEqual(True, lockfuncs.inside(self.char1, self.room1))
self.assertEqual(False, lockfuncs.inside(self.char1, self.room2))