Update test_search.py
This commit is contained in:
parent
3930bb7978
commit
bc2478ca9f
1 changed files with 3 additions and 3 deletions
|
|
@ -84,7 +84,7 @@ class TestSearch(EvenniaTest):
|
||||||
|
|
||||||
def test_search_object_attribute(self):
|
def test_search_object_attribute(self):
|
||||||
"""Check that an object can be found by its attributes."""
|
"""Check that an object can be found by its attributes."""
|
||||||
script, errors = DefaultObject.create("an-object")
|
object, errors = DefaultObject.create("an-object")
|
||||||
object.db.an_attribute = "some value"
|
object.db.an_attribute = "some value"
|
||||||
found = search_object_attribute(key="an_attribute", value="some value")
|
found = search_object_attribute(key="an_attribute", value="some value")
|
||||||
self.assertEqual(len(found), 1, errors)
|
self.assertEqual(len(found), 1, errors)
|
||||||
|
|
@ -92,7 +92,7 @@ class TestSearch(EvenniaTest):
|
||||||
|
|
||||||
def test_search_object_attribute_wrong(self):
|
def test_search_object_attribute_wrong(self):
|
||||||
"""Check that an object cannot be found by wrong value of its attributes."""
|
"""Check that an object cannot be found by wrong value of its attributes."""
|
||||||
script, errors = DefaultObject.create("an-object")
|
object, errors = DefaultObject.create("an-object")
|
||||||
script.db.an_attribute = "some value"
|
object.db.an_attribute = "some value"
|
||||||
found = search_object_attribute(key="an_attribute", value="wrong value")
|
found = search_object_attribute(key="an_attribute", value="wrong value")
|
||||||
self.assertEqual(len(found), 0, errors)
|
self.assertEqual(len(found), 0, errors)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue