Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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()