Having issues with update_comment function

for the add comment, i did an insert_one fine, putting the fields where they need to be.
for the update_comment, i did an update_one, with match parameters of _id and email, and setting the text and date as per requirements. But i’m getting the Unable to update comment on the web.

Did you check the console for any error message? Did the unit tests passed for the ticket?


I am having the same issue, any solution yet?


My Unit test does not work either, i hope you are referring to this code result “pytest -m create_update_comments” Giving me TypeError: not just for this but other tests trials. so i depend on the status page outcome.


Please check the console messages when running the unit tests. That will give you an idea of what is going wrong.


this is my console output: - - [18/Nov/2019 15:44:59] “POST /api/v1/user/register HTTP/1.1” 201 - - - [18/Nov/2019 15:45:02] “POST /api/v1/user/register HTTP/1.1” 201 - - - [18/Nov/2019 15:45:05] “POST /api/v1/movies/comment HTTP/1.1” 200 - - - [18/Nov/2019 15:45:08] “PUT /api/v1/movies/comment HTTP/1.1” 400 - - - [18/Nov/2019 15:45:10] “PUT /api/v1/movies/comment HTTP/1.1” 400 -

please any solution on the subject matter? on my notebook, everything is working fine, comment created and updated, but on my db.py file using the console output, i am having the “…http/1.1 400” as shown above
Thank you in advance


From which directory you are running the unit tests? It should be mflix-python.


Hi Kani,

sorry for late reply, i was away.

Yes to your question.

But then i have seen here that others are having the same issue, though i dont know if theirs were resolved

Any hint pls

I would recommend checking the code again as it seems like a syntax error. Please do share the code and the screenshot when running the unit test .

     pytest -m create_update_comments

Also, check this post if it helps. :slight_smile: