Skip to content

Commit eaf5614

Browse files
committed
test: TT-180 add test validate list
1 parent c9ae125 commit eaf5614

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/time_tracker_api/activities/activities_model_test.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ActivityCosmosDBModel,
1111
)
1212

13-
13+
"""
1414
def create_activity(
1515
valid_tenant_id: str,
1616
event_context: EventContext,
@@ -28,6 +28,19 @@ def create_activity(
2828
data, event_context, mapper=ActivityCosmosDBModel
2929
)
3030
return created_item
31+
"""
32+
33+
34+
@pytest.mark.parametrize(
35+
"id_list", [123, (1, 2), "id_list", {"id_list": []},],
36+
)
37+
def test_validate_list(
38+
id_list, activity_repository: ActivityCosmosDBRepository
39+
):
40+
try:
41+
activity_repository.validate_list(id_list)
42+
except Exception as e:
43+
assert type(e) is AssertionError
3144

3245

3346
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)