To fix #171, I thought we should fix the tests first. There were a lot of weak assertions and simply wrong test cases. There are also missing cases, but I'll go through them on the next iteration of fixing #171. I've fixed the Post and Comments not being created issue.
On the way, I fixed some logic on Comments which was taking 'owner' as an argument from outside. I have changed it to use the currently logged in user. I want the frontend team to check if their comment system is working.
I've changed the way both Comments and Posts work now. I want frontend to be checked if API is being used for Posts and Comments. To fix any issues, you have to send authorization information to API. Either session or Token authorization is accepted. API will request authorization at some point so getting this set up will actually buy you time from future.
Changes
Added exception handlers for JSON data accesses.
Removed/Merged unnecessary cases, assertions
Added a dummy data generator module
Added descriptive error messages
Added post create/update/delete tests.
Added another Post Serializer for create and update operations
About
To fix #171, I thought we should fix the tests first. There were a lot of weak assertions and simply wrong test cases.
There are also missing cases, but I'll go through them on the next iteration of fixing #171.I've fixed the Post and Comments not being created issue.On the way, I fixed some logic on Comments which was taking 'owner' as an argument from outside. I have changed it to use the currently logged in user. I want the frontend team to check if their comment system is working.I've changed the way both Comments and Posts work now. I want frontend to be checked if API is being used for Posts and Comments. To fix any issues, you have to send authorization information to API. Either session or Token authorization is accepted. API will request authorization at some point so getting this set up will actually buy you time from future.
Changes
Added exception handlers for JSON data accesses.
Removed/Merged unnecessary cases, assertions
Added a dummy data generator module
Added descriptive error messages
Added post create/update/delete tests.
Added another Post Serializer for create and update operations