66from flask_restplus ._http import HTTPStatus
77from pytest_mock import MockFixture
88
9+ from utils .enums .status import Status
10+
911fake = Faker ()
1012
1113valid_activity_data = {
@@ -101,7 +103,7 @@ def test_list_all_active_activities(
101103
102104 repository_find_all_mock .assert_called_once_with (
103105 event_context = ANY ,
104- conditions = {'status' : 'active' },
106+ conditions = {'status' : Status . ACTIVE . value },
105107 activities_id = ANY ,
106108 visible_only = ANY ,
107109 max_count = ANY ,
@@ -259,7 +261,7 @@ def test_delete_activity_should_succeed_with_valid_id(
259261 assert HTTPStatus .NO_CONTENT == response .status_code
260262 assert b'' == response .data
261263 repository_remove_mock .assert_called_once_with (
262- str (valid_id ), {'status' : 'inactive' }, ANY
264+ str (valid_id ), {'status' : Status . INACTIVE . value }, ANY
263265 )
264266
265267
@@ -283,7 +285,7 @@ def test_delete_activity_should_return_not_found_with_invalid_id(
283285
284286 assert HTTPStatus .NOT_FOUND == response .status_code
285287 repository_remove_mock .assert_called_once_with (
286- str (invalid_id ), {'status' : 'inactive' }, ANY
288+ str (invalid_id ), {'status' : Status . INACTIVE . value }, ANY
287289 )
288290
289291
@@ -309,5 +311,5 @@ def test_delete_activity_should_return_422_for_invalid_id_format(
309311
310312 assert HTTPStatus .UNPROCESSABLE_ENTITY == response .status_code
311313 repository_remove_mock .assert_called_once_with (
312- str (invalid_id ), {'status' : 'inactive' }, ANY
314+ str (invalid_id ), {'status' : Status . INACTIVE . value }, ANY
313315 )
0 commit comments