Use test character class instead
This commit is contained in:
parent
f738427ff3
commit
52d505b011
1 changed files with 5 additions and 10 deletions
|
|
@ -1227,13 +1227,10 @@ class TestTurnBattleFunc(EvenniaTest):
|
||||||
# Remove the script at the end
|
# Remove the script at the end
|
||||||
turnhandler.stop()
|
turnhandler.stop()
|
||||||
|
|
||||||
"""
|
|
||||||
# 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.TBItemsCharacterTest, key="Attacker")
|
||||||
tb_items.tickerhandler.remove(interval=30, callback=attacker.at_update, idstring="update")
|
defender = create_object(tb_items.TBItemsCharacterTest, 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
|
||||||
|
|
@ -1300,7 +1297,7 @@ class TestTurnBattleFunc(EvenniaTest):
|
||||||
turnhandler.turn_end_check(attacker)
|
turnhandler.turn_end_check(attacker)
|
||||||
self.assertTrue(turnhandler.db.turn == 1)
|
self.assertTrue(turnhandler.db.turn == 1)
|
||||||
# Join fight
|
# Join fight
|
||||||
joiner = create_object(tb_items.TBItemsCharacter, key="Joiner")
|
joiner = create_object(tb_items.TBItemsCharacterTest, key="Joiner")
|
||||||
turnhandler.db.fighters = [attacker, defender]
|
turnhandler.db.fighters = [attacker, defender]
|
||||||
turnhandler.db.turn = 0
|
turnhandler.db.turn = 0
|
||||||
turnhandler.join_fight(joiner)
|
turnhandler.join_fight(joiner)
|
||||||
|
|
@ -1309,8 +1306,7 @@ class TestTurnBattleFunc(EvenniaTest):
|
||||||
# Remove the script at the end
|
# Remove the script at the end
|
||||||
turnhandler.stop()
|
turnhandler.stop()
|
||||||
# Now time to test item stuff.
|
# Now time to test item stuff.
|
||||||
user = create_object(tb_items.TBItemsCharacter, key="User")
|
user = create_object(tb_items.TBItemsCharacterTest, key="User")
|
||||||
tb_items.tickerhandler.remove(interval=30, callback=user.at_update, idstring="update")
|
|
||||||
testroom = create_object(DefaultRoom, key="Test Room")
|
testroom = create_object(DefaultRoom, key="Test Room")
|
||||||
user.location = testroom
|
user.location = testroom
|
||||||
test_healpotion = create_object(key="healing potion")
|
test_healpotion = create_object(key="healing potion")
|
||||||
|
|
@ -1343,7 +1339,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