@@ -146,8 +146,8 @@ def test_list_all_time_entries(
146
146
time_entries_dao ,
147
147
)
148
148
149
- repository_find_all_mock = mocker .patch .object (
150
- time_entries_dao . repository , 'find_all ' , return_value = []
149
+ dao_get_all_mock = mocker .patch .object (
150
+ time_entries_dao , 'get_all ' , return_value = []
151
151
)
152
152
153
153
response = client .get (
@@ -156,7 +156,7 @@ def test_list_all_time_entries(
156
156
157
157
assert HTTPStatus .OK == response .status_code
158
158
assert [] == json .loads (response .data )
159
- repository_find_all_mock .assert_called_once ()
159
+ dao_get_all_mock .assert_called_once ()
160
160
161
161
162
162
def test_get_time_entry_should_succeed_with_valid_id (
@@ -166,8 +166,8 @@ def test_get_time_entry_should_succeed_with_valid_id(
166
166
time_entries_dao ,
167
167
)
168
168
169
- repository_find_mock = mocker .patch .object (
170
- time_entries_dao . repository , 'find ' , return_value = fake_time_entry
169
+ dao_get_mock = mocker .patch .object (
170
+ time_entries_dao , 'get ' , return_value = {}
171
171
)
172
172
173
173
valid_id = fake .random_int (1 , 9999 )
@@ -179,9 +179,7 @@ def test_get_time_entry_should_succeed_with_valid_id(
179
179
180
180
assert HTTPStatus .OK == response .status_code
181
181
fake_time_entry == json .loads (response .data )
182
- repository_find_mock .assert_called_once_with (
183
- str (valid_id ), ANY , peeker = ANY
184
- )
182
+ dao_get_mock .assert_called_once_with (str (valid_id ))
185
183
186
184
187
185
def test_get_time_entry_should_response_with_unprocessable_entity_for_invalid_id_format (
@@ -614,20 +612,15 @@ def test_find_all_is_called_with_generated_dates(
614
612
time_entries_dao ,
615
613
)
616
614
617
- repository_find_all_mock = mocker .patch .object (
618
- time_entries_dao . repository , 'find_all ' , return_value = []
615
+ dao_get_all_mock = mocker .patch .object (
616
+ time_entries_dao , 'get_all ' , return_value = []
619
617
)
620
618
621
619
response = client .get (url , headers = valid_header , follow_redirects = True )
622
620
623
- date_range = get_date_range_of_month (year , month )
624
- conditions = {'owner_id' : owner_id }
625
-
626
621
assert HTTPStatus .OK == response .status_code
627
622
assert json .loads (response .data ) is not None
628
- repository_find_all_mock .assert_called_once_with (
629
- ANY , conditions = conditions , date_range = date_range
630
- )
623
+ dao_get_all_mock .assert_called_once ()
631
624
632
625
633
626
def test_summary_is_called_with_date_range_from_worked_time_module (
0 commit comments