コード例 #1
0
ファイル: player_tests.py プロジェクト: fpadjen/MauMau
 def test_play_not_playable(self):
     player = Player()
     player.client = Mock()
     player.output_device = Mock()
     player.input_device = Mock(side_effect=[1, 0])
     player.current_middle = 'card_of_card'
     player.hand = ['card_of_card', 'not_of_not']
     data = {'action': 'play', 'middle': 'card_of_card'}
     player.play(data)
コード例 #2
0
ファイル: player_tests.py プロジェクト: fpadjen/MauMau
 def test_play(self):
     player = Player()
     player.client = Mock()
     player.output_device = Mock()
     player.input_device = Mock(return_value=0)
     player.current_middle = 'card_of_card'
     player.hand = ['card_of_card']
     data = {'action': 'play', 'middle': 'card_of_card'}
     player.play(data)