Add tests for get_complaint_count endpoint

* Added unit tests for the get_complaint_count endpoint
* Updated the schema to use 'date' format instead of 'datetime'
* Updated the complaint endpoint to convert start_date and end_date to
be dates instead of strings
This commit is contained in:
Katie Smith
2018-06-12 12:10:58 +01:00
parent 28beeebbf4
commit 7f4b828aff
3 changed files with 49 additions and 14 deletions

View File

@@ -5,7 +5,7 @@ complaint_count_request = {
"type": "object",
"title": "Complaint count request",
"properties": {
"start_date": {"type": ["string", "null"], "format": "datetime"},
"end_date": {"type": ["string", "null"], "format": "datetime"},
"start_date": {"type": ["string", "null"], "format": "date"},
"end_date": {"type": ["string", "null"], "format": "date"},
}
}