@@ -53,7 +53,7 @@ def test_falls_back_to_first_page_text_if_metadata_title_does_not_match_regex(se
5353 expected_title = "Advances in Mood Disorder Pharmacotherapy: Evaluating New Antipsychotics and Mood Stabilizers for Bipolar Disorder and Schizophrenia"
5454 self .assertEqual (expected_title , title .generate_title (doc ))
5555
56- @patch ("api.services.openai_services .openAIServices.openAI" )
56+ @patch ("api.views.uploadFile.title .openAIServices.openAI" )
5757 def test_falls_back_to_chatgpt_if_no_title_found (self , mock_openAI ):
5858 doc = MagicMock ()
5959 doc .metadata = {"title" : None }
@@ -68,7 +68,7 @@ def test_falls_back_to_chatgpt_if_no_title_found(self, mock_openAI):
6868
6969 self .assertTrue (mock_openAI .called )
7070
71- @patch ("api.services.openai_services .openAIServices.openAI" )
71+ @patch ("api.views.uploadFile.title .openAIServices.openAI" )
7272 def test_strips_quotes_from_openai_title (self , mock_openAI ):
7373 doc = MagicMock ()
7474 doc .metadata = {"title" : None }
@@ -83,7 +83,7 @@ def test_strips_quotes_from_openai_title(self, mock_openAI):
8383
8484 self .assertEqual (result , "Updated CANMAT/ISBD Guidelines for Treating Mixed Features in Bipolar Disorder" )
8585
86- @patch ("api.services.openai_services .openAIServices.openAI" )
86+ @patch ("api.views.uploadFile.title .openAIServices.openAI" )
8787 def test_truncates_long_openai_title (self , mock_openAI ):
8888 doc = MagicMock ()
8989 doc .metadata = {"title" : None }
0 commit comments