mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix tests related to changing TraitHandler.all to TraitHandler.all()
This commit is contained in:
parent
87863757bf
commit
560c9356bb
2 changed files with 4 additions and 4 deletions
|
|
@ -92,7 +92,7 @@ class TraitHandlerTest(_TraitHandlerBase):
|
|||
Cache should not be set until first get
|
||||
"""
|
||||
self.assertEqual(len(self.traithandler._cache), 0)
|
||||
self.traithandler.all # does not affect cache
|
||||
self.traithandler.all() # does not affect cache
|
||||
self.assertEqual(len(self.traithandler._cache), 0)
|
||||
self.traithandler.test1
|
||||
self.assertEqual(len(self.traithandler._cache), 1)
|
||||
|
|
@ -124,7 +124,7 @@ class TraitHandlerTest(_TraitHandlerBase):
|
|||
|
||||
def test_all(self):
|
||||
"Test all method"
|
||||
self.assertEqual(self.traithandler.all, ["test1", "test2"])
|
||||
self.assertEqual(self.traithandler.all(), ["test1", "test2"])
|
||||
|
||||
def test_remove(self):
|
||||
"Test remove method"
|
||||
|
|
|
|||
|
|
@ -609,7 +609,7 @@ class TraitHandler:
|
|||
|
||||
def __repr__(self):
|
||||
return "TraitHandler ({num} Trait(s) stored): {keys}".format(
|
||||
num=len(self), keys=", ".join(self.all)
|
||||
num=len(self), keys=", ".join(self.all())
|
||||
)
|
||||
|
||||
def _get_trait_class(self, trait_type=None, trait_key=None):
|
||||
|
|
@ -718,7 +718,7 @@ class TraitHandler:
|
|||
"""
|
||||
Remove all Traits from the handler's parent object.
|
||||
"""
|
||||
for trait_key in self.all:
|
||||
for trait_key in self.all():
|
||||
self.remove(trait_key)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue