mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Update test_search.py
This commit is contained in:
parent
421229d280
commit
2922c0c7d9
1 changed files with 8 additions and 1 deletions
|
|
@ -21,9 +21,16 @@ class TestSearch(EvenniaTest):
|
|||
self.assertEqual(script.key, found[0].key, errors)
|
||||
|
||||
def test_search_script_tag_wrong_category(self):
|
||||
"""Check that a script can be found by its tag and category."""
|
||||
"""Check that a script cannot be found by the wrong category."""
|
||||
script, errors = DefaultScript.create("a-script")
|
||||
script.tags.add("a-tag", category="a-category")
|
||||
found = search_script_tag("a-tag", category="wrong-category")
|
||||
self.assertEqual(len(found), 0, errors)
|
||||
|
||||
def test_search_script_tag_wrong(self):
|
||||
"""Check that a script cannot be found by the wrong tag."""
|
||||
script, errors = DefaultScript.create("a-script")
|
||||
script.tags.add("a-tag", category="a-category")
|
||||
found = search_script_tag("wrong-tag", category="a-category")
|
||||
self.assertEqual(len(found), 0, errors)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue