Esempio n. 1
0
 def test_game_next_question_no_more_images(self, mocker):
     mock_prepare_picture_round = mocker.patch(
         "qwazzock.Game.prepare_picture_round")
     game = Game()
     game.question_type = "picture"
     game.selected_image_index = 2
     game.question_images = ["foo.jpg", "bar.png", "blah.bmp"]
     game.next_question()
     assert game.question_type == "standard"
     assert len(mock_prepare_picture_round.mock_calls) == 2
Esempio n. 2
0
 def test_game_next_question_ok(self, mocker):
     mocker.patch("qwazzock.Game.prepare_picture_round")
     game = Game()
     game.question_type = "picture"
     game.selected_image_index = 1
     game.question_images = ["foo.jpg", "bar.png", "blah.bmp"]
     game.next_question()
     assert game.selected_image_index == 2
     assert game.selected_image == "blah.bmp"
     assert game.question_type == "picture"