From 1ee4132f1559973035279033852bd0af30df73c3 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 19 Nov 2024 17:27:39 +0000 Subject: [PATCH] fixes --- rating_api/schemas/models.py | 2 +- tests/test_routes/test_comment.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rating_api/schemas/models.py b/rating_api/schemas/models.py index 70fc495..5f064a9 100644 --- a/rating_api/schemas/models.py +++ b/rating_api/schemas/models.py @@ -26,7 +26,7 @@ class CommentPost(Base): mark_kindness: int mark_freebie: int mark_clarity: int - is_anonymous: bool + is_anonymous: bool = True @field_validator('mark_kindness', 'mark_freebie', 'mark_clarity') @classmethod diff --git a/tests/test_routes/test_comment.py b/tests/test_routes/test_comment.py index a02f646..f6a806a 100644 --- a/tests/test_routes/test_comment.py +++ b/tests/test_routes/test_comment.py @@ -29,6 +29,17 @@ 0, status.HTTP_200_OK, ), + ( + { + "subject": "test_subject", + "text": "test_text", + "mark_kindness": 1, + "mark_freebie": 0, + "mark_clarity": 0, + }, + 0, + status.HTTP_200_OK, + ), ( { "subject": "test1_subject",