@@ -23,19 +23,19 @@ def setup_method(self):
2323 self .service = CategoryRecommendationService (self .mock_repository , self .mock_queue )
2424
2525 # 테스트 공통 데이터
26- self .test_title = "테스트 제목 "
26+ self .test_file_id = "67dd86ac60a0a6d929904d47 "
2727 self .test_user_id = uuid .UUID ("12345678-1234-5678-1234-567812345678" )
2828 self .test_request_id = "6123456789abcdef01234567"
2929 self .test_object_id = ObjectId (self .test_request_id )
3030
3131 def test_create_recommendation_request (self ):
3232 # given
33- request = CategoryRecommendationRequest (title = self .test_title )
33+ request = CategoryRecommendationRequest (file_id = self .test_file_id )
3434
3535 # 리포지토리 응답 설정
3636 mongo_document = {
3737 "_id" : self .test_object_id ,
38- "title " : self .test_title ,
38+ "file_id " : self .test_file_id ,
3939 "user_id" : str (self .test_user_id ),
4040 "is_completed" : False ,
4141 "created_at" : datetime (2023 , 1 , 1 , tzinfo = timezone .utc )
@@ -47,13 +47,13 @@ def test_create_recommendation_request(self):
4747
4848 # then
4949 self .mock_repository .create_recommendation_request .assert_called_once_with (
50- title = self .test_title ,
50+ file_id = self .test_file_id ,
5151 user_id = str (self .test_user_id )
5252 )
5353
5454 self .mock_queue .send_message .assert_called_once_with (
5555 request_id = self .test_request_id ,
56- title = self .test_title ,
56+ file_id = self .test_file_id ,
5757 user_id = str (self .test_user_id )
5858 )
5959
@@ -65,7 +65,7 @@ def test_get_recommendation_status_exists(self):
6565 # 리포지토리 응답 설정 - 완료되지 않은 추천
6666 mongo_document = {
6767 "_id" : self .test_object_id ,
68- "title " : self .test_title ,
68+ "file_id " : self .test_file_id ,
6969 "user_id" : str (self .test_user_id ),
7070 "is_completed" : False ,
7171 "created_at" : datetime (2023 , 1 , 1 , tzinfo = timezone .utc )
@@ -90,7 +90,7 @@ def test_get_recommendation_status_completed(self):
9090 # 리포지토리 응답 설정 - 완료된 추천
9191 mongo_document = {
9292 "_id" : self .test_object_id ,
93- "title " : self .test_title ,
93+ "file_id " : self .test_file_id ,
9494 "user_id" : str (self .test_user_id ),
9595 "is_completed" : True ,
9696 "predicted_category" : "기술" ,
@@ -134,7 +134,7 @@ def test_update_recommendation_result_success(self):
134134 # 리포지토리 응답 설정
135135 updated_document = {
136136 "_id" : self .test_object_id ,
137- "title " : self .test_title ,
137+ "file_id " : self .test_file_id ,
138138 "user_id" : str (self .test_user_id ),
139139 "is_completed" : True ,
140140 "predicted_category" : "기술" ,
0 commit comments