Also remove ticker handler for 'attacker' and 'defender'
Whoops! I forgot that ALL my test characters are getting subscribed to the ticker handler here - maybe that's the problem?
This commit is contained in:
parent
2549a8d8e1
commit
0932a839ba
1 changed files with 2 additions and 3 deletions
|
|
@ -1230,7 +1230,9 @@ class TestTurnBattleFunc(EvenniaTest):
|
||||||
# Test functions in tb_items.
|
# Test functions in tb_items.
|
||||||
def test_tbitemsfunc(self):
|
def test_tbitemsfunc(self):
|
||||||
attacker = create_object(tb_items.TBItemsCharacter, key="Attacker")
|
attacker = create_object(tb_items.TBItemsCharacter, key="Attacker")
|
||||||
|
tb_items.tickerhandler.remove(interval=30, callback=attacker.at_update, idstring="update")
|
||||||
defender = create_object(tb_items.TBItemsCharacter, key="Defender")
|
defender = create_object(tb_items.TBItemsCharacter, key="Defender")
|
||||||
|
tb_items.tickerhandler.remove(interval=30, callback=defender.at_update, idstring="update")
|
||||||
testroom = create_object(DefaultRoom, key="Test Room")
|
testroom = create_object(DefaultRoom, key="Test Room")
|
||||||
attacker.location = testroom
|
attacker.location = testroom
|
||||||
defender.loaction = testroom
|
defender.loaction = testroom
|
||||||
|
|
@ -1316,8 +1318,6 @@ class TestTurnBattleFunc(EvenniaTest):
|
||||||
# Spend item use
|
# Spend item use
|
||||||
tb_items.spend_item_use(test_healpotion, user)
|
tb_items.spend_item_use(test_healpotion, user)
|
||||||
self.assertTrue(test_healpotion.db.item_uses == 2)
|
self.assertTrue(test_healpotion.db.item_uses == 2)
|
||||||
# Commenting this stuff out just to make sure it's the problem.
|
|
||||||
"""
|
|
||||||
# Use item
|
# Use item
|
||||||
user.db.hp = 2
|
user.db.hp = 2
|
||||||
tb_items.use_item(user, test_healpotion, user)
|
tb_items.use_item(user, test_healpotion, user)
|
||||||
|
|
@ -1342,7 +1342,6 @@ class TestTurnBattleFunc(EvenniaTest):
|
||||||
self.assertTrue(user.db.conditions == {})
|
self.assertTrue(user.db.conditions == {})
|
||||||
# Delete the test character
|
# Delete the test character
|
||||||
user.delete()
|
user.delete()
|
||||||
"""
|
|
||||||
|
|
||||||
# Test tree select
|
# Test tree select
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue