Mercurial > pyntnclick
comparison gamelib/tests/test_scene_interactions_cryo.py @ 60:90b32447b239
Some test refactorage.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 23 Aug 2010 17:16:05 +0200 |
parents | |
children | 6b0f7364f3bf |
comparison
equal
deleted
inserted
replaced
59:23d2c58369fc | 60:90b32447b239 |
---|---|
1 import game_logic_utils | |
2 | |
3 | |
4 class TestGameLogic(game_logic_utils.GameLogicTestCase): | |
5 | |
6 CURRENT_SCENE = 'cryo' | |
7 | |
8 def test_cryo_door_closed_hand(self): | |
9 "The door is closed and we touch it with the hand. No change." | |
10 | |
11 self.assert_game_data('accessible', True) | |
12 self.assert_game_data('accessible', False, scene='bridge') | |
13 self.assert_game_data('open', False, 'cryo.door') | |
14 | |
15 self.interact_thing('cryo.door') | |
16 | |
17 self.assert_game_data('accessible', True) | |
18 self.assert_game_data('accessible', False, scene='bridge') | |
19 self.assert_game_data('open', False, 'cryo.door') | |
20 | |
21 def test_cryo_door_closed_titanium_leg(self): | |
22 "The door is closed and we touch it with the titanium leg. It opens." | |
23 | |
24 self.assert_game_data('accessible', True) | |
25 self.assert_game_data('accessible', False, scene='bridge') | |
26 self.assert_game_data('open', False, 'cryo.door') | |
27 | |
28 self.interact_thing('cryo.door', 'titanium_leg') | |
29 | |
30 self.assert_game_data('accessible', True) | |
31 self.assert_game_data('accessible', True, scene='bridge') | |
32 self.assert_game_data('open', True, 'cryo.door') | |
33 | |
34 def test_cryo_door_open_hand(self): | |
35 "The door is open and we touch it with the hand. No change." | |
36 | |
37 self.set_game_data('accessible', True, scene='bridge') | |
38 self.set_game_data('open', True, 'cryo.door') | |
39 | |
40 self.interact_thing('cryo.door') | |
41 | |
42 self.assert_game_data('accessible', True) | |
43 self.assert_game_data('accessible', True, scene='bridge') | |
44 self.assert_game_data('open', True, 'cryo.door') | |
45 | |
46 def test_cryo_door_open_titanium_leg(self): | |
47 "The door is open and we touch it with the titanium leg. No change." | |
48 | |
49 self.set_game_data('accessible', True, scene='bridge') | |
50 self.set_game_data('open', True, 'cryo.door') | |
51 | |
52 self.interact_thing('cryo.door', 'titanium_leg') | |
53 | |
54 self.assert_game_data('accessible', True) | |
55 self.assert_game_data('accessible', True, scene='bridge') | |
56 self.assert_game_data('open', True, 'cryo.door') |