Skip to content

Commit f9532ea

Browse files
authored
test: TT-384 changed test name with correct formatting
1 parent afd537d commit f9532ea

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

tests/commons/data_access_layer/file_stream_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
fs = FileStream("storageaccounteystr82c5","tt-common-files")
66

7-
def test_get_file_stream_return_file_when_enter_file_name():
7+
def test__get_file_stream__return_file_content__when_enter_file_name():
88
result = fs.get_file_stream("activity_test.json")
99

1010
assert len(json.load(result)) == 15
1111

12-
def test_get_file_stream_return_None_when_not_enter_file_name_or_incorrect_name():
12+
def test__get_file_stream__return_None__when_not_enter_file_name_or_incorrect_name():
1313
result = fs.get_file_stream("")
1414

1515
assert result == None

tests/time_tracker_api/activities/activities_model_test.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_create_activity_should_add_active_status(
6565
data=expect_argument, event_context=ANY
6666
)
6767

68-
def test_find_all_from_blob_storage(
68+
def test__find_all_from_blob_storage__return_list__when_send_event_context_and_correct_file_name(
6969
event_context: EventContext,
7070
activity_repository: ActivityCosmosDBRepository,
7171
):
@@ -76,3 +76,15 @@ def test_find_all_from_blob_storage(
7676
file_name="activity_test.json"
7777
)
7878
assert len(result) == 15
79+
80+
def test__find_all_from_blob_storage__return_empty_list__when_send_event_context_and_incorrect_file_name(
81+
event_context: EventContext,
82+
activity_repository: ActivityCosmosDBRepository,
83+
):
84+
activity_repository.container = Mock()
85+
86+
result = activity_repository.find_all_from_blob_storage(
87+
event_context=event_context,
88+
file_name="incorrect.json"
89+
)
90+
assert result == []

tests/time_tracker_api/activities/activities_namespace_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
fake_activity = ({"id": fake.random_int(1, 9999)}).update(valid_activity_data)
2121

22-
def test_get_all_activities_return_list_activities_when_send_get_request(
22+
def test__get_all_activities__return_response__when_send_activities_get_request(
2323
client: FlaskClient, valid_header: dict
2424
):
2525
response = client.get(

0 commit comments

Comments
 (0)