def test_xml_data_raises_error_with_bad_unicode_dataset(self, handle_req, bad_response, app): with app.test_request_context(): handle_req.return_value = bad_response resp = view.search_marcxml('db') assert resp.status_code == 500
def test_correct_xml_data_included_with_successful_query(self, handle_req, search_response, app): with app.test_request_context(): handle_req.return_value = search_response res = view.search_marcxml('db') assert res.data == search_response[1].to_marcxml()
def test_xml_data_raises_error_with_bad_unicode_dataset(self, handle_req, bad_response, app): with app.test_request_context(): handle_req.return_value = bad_response resp = view.search_marcxml("db") assert resp.status_code == 500
def test_correct_xml_data_included_with_successful_query(self, handle_req, search_response, app): with app.test_request_context(): handle_req.return_value = search_response res = view.search_marcxml("db") assert res.data == search_response[1].to_marcxml()