Better handle partial search matches. Resolve #2579

This commit is contained in:
Griatch 2022-03-01 18:28:53 +01:00
parent 6028844901
commit d69589ec99
3 changed files with 12 additions and 6 deletions

View file

@ -1035,7 +1035,7 @@ class TestGetAndMergeCmdSets(TwistedTestCase, BaseEvenniaTest):
pcmdset = AccountCmdSet()
pcmdset.at_cmdset_creation()
pcmds = [cmd.key for cmd in pcmdset.commands] + ["a", "b", "c", "d"]
self.assertTrue(all(cmd.key in pcmds for cmd in cmdset.commands))
self.assertEqual(set(cmd.key for cmd in cmdset.commands), set(pcmds))
# _callback = lambda cmdset: self.assertEqual(sum(1 for cmd in cmdset.commands if cmd.key in ("a", "b", "c", "d")), 4)
deferred.addCallback(_callback)