search.services.tests.test_fulltext module¶
Tests for search.services.fulltext
.
-
class
search.services.tests.test_fulltext.
TestRetrieveExistantContent
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Fulltext content is available for a paper.
-
test_calls_fulltext_endpoint
(mock_get)[source]¶ fulltext.retrieve()
calls passed endpoint with GET.
-
-
class
search.services.tests.test_fulltext.
TestRetrieveMalformedRecord
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Fulltext endpoint returns non-JSON response.
-
test_response_is_not_json
(mock_get)[source]¶ fulltext.retrieve()
raises IOError when not valid JSON.
-
-
class
search.services.tests.test_fulltext.
TestRetrieveNonexistantRecord
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Fulltext content is not available for a paper.
-
test_raise_ioerror_on_404
(mock_get)[source]¶ fulltext.retrieve()
raises IOError when text unvailable.
-
test_raise_ioerror_on_503
(mock_get)[source]¶ fulltext.retrieve()
raises IOError when text unvailable.
-
test_raise_ioerror_on_sslerror
(mock_get)[source]¶ fulltext.retrieve()
raises IOError when SSL fails.
-