def test_gc_check_game_bad_game(self):
     g = GameController()
     with self.assertRaises(ValueError):
         response_object = {
             "bulls": None,
             "cows": None,
             "analysis": None,
             "status": None
         }
         g.game = None
         g._check_game_on(response_object=response_object)
    def test_gc_check_game_nomore_turns(self):
        response_object = {
            "bulls": None,
            "cows": None,
            "analysis": None,
            "status": None
        }
        g = GameController()
        for _ in range(11):
            r = g.guess(0, 0, 0, 0)

        r = g._check_game_on(response_object)
        self.assertEqual(r, False)
        self.assertIn("You already lost! The correct answer was",
                      response_object["status"])
 def test_gc_check_game_bad_response(self):
     g = GameController()
     with self.assertRaises(ValueError):
         g._check_game_on(response_object=None)