diff --git a/tests/test_pagure_flask_api_issue.py b/tests/test_pagure_flask_api_issue.py index 9c8aaf5..f4d77b2 100644 --- a/tests/test_pagure_flask_api_issue.py +++ b/tests/test_pagure_flask_api_issue.py @@ -1082,6 +1082,30 @@ class PagureFlaskApiIssuetests(tests.Modeltests): } ) + # Test since when status is an absurd input + output = self.app.get( + '/api/0/test/issues?status=hello&since=1431414700', headers=headers) + self.assertEqual(output.status_code, 200) + data = json.loads(output.data) + for idx in range(len(data['issues'])): + data['issues'][idx]['last_updated'] = '1431414800' + data['issues'][idx]['date_created'] = '1431414800' + self.assertDictEqual( + data, + { + "args": { + "assignee": None, + "author": None, + "since": '1431414700', + "status": "hello", + "tags": [] + }, + "issues": [], + "total_issues": 0 + } + ) + + def test_api_view_issue(self): """ Test the api_view_issue method of the flask api. """ self.test_api_new_issue()