def test_judge_flg_3(self):
     mock_dbutil = mock.MagicMock()
     mock_dbutil.fetch_used_words_list.return_value = ["a", "b", "c"]
     mock_dbutil.search_player_which_use_the_word.return_value = ["CPU", "1"]
     with mock.patch("main.DBUtil", return_value=mock_dbutil):
         wordchain = WordChain("test_dictionary.txt")
         message = wordchain.judge(["d", 3])
     self.assertEqual(message, "その言葉は 1 回目に CPU が使用しています。わたしの勝ちです。今回のしりとりでは 3 個の単語を使用しました。")
 def test_judge_flg_2(self):
     with mock.patch("main.DBUtil.fetch_used_words_list", return_value=["a", "b", "c"]) as mock_dbutil:
         wordchain = WordChain("test_dictionary.txt")
         message = wordchain.judge(["d", 2])
     self.assertEqual(message, "しりとりルール違反です。私の勝ちです。今回のしりとりでは 3 個の単語を使用しました。")