def test_delete_answer(client): headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer {0}'.format(get_test_token(client)) } response = client.delete('/v1/answers/1', headers=headers) assert response.status[:3] == '204' assert not Answer.query.filter_by(id=1).first()
def test_delete_course(client): headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer {0}'.format(get_test_token(client)) } response = client.delete('/v1/courses/1', headers=headers) assert response.status == '204 NO CONTENT', response.data assert not Course.query.filter_by(cid=1).first()