Changeset 521


Ignore:
Timestamp:
03/09/10 19:52:38 (10 years ago)
Author:
beliar
Message:

Fixes "Test basic dialogue interaction" test, without breaking in game dialogues this time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/tests/test_dialogue.py

    r514 r521  
    7575        } 
    7676        # record actions in test_vars 
    77         test_vars = { "say": None, "responses": [] } 
    78  
     77        state = { "say": None, "responses": [] } 
     78         
     79         
    7980        def sayCb(state, text): 
    8081            state["say"] = text 
     
    8283        self.replies = ["resp1", "back", "end"] 
    8384 
    84         def npcAvatarCb(state, image): 
     85        def npcAvatarCb(image): 
    8586            state['npc_avatar'] = image 
    8687 
     
    9495        } 
    9596 
    96         self.dialogue = DialogueEngine(self.tree, callbacks, test_vars) 
     97        self.dialogue = DialogueEngine(self.tree, callbacks, state) 
    9798 
    9899    def assertSay(self, text): 
Note: See TracChangeset for help on using the changeset viewer.