oaebu_workflows.jstor_telescope.tests.test_jstor_telescope
Module Contents
Classes
Tests for the Jstor telescope |
|
Tests for the Jstor telescope |
Functions
|
Test getting label id both when label already exists and does not exist yet. |
|
Create a list with mocked http responses |
|
Create a list with mocked http responses for the collection workflow of the telescope |
- oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.dummy_gmail_connection()[source]
- Return type:
airflow.models.connection.Connection
- class oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.TestTelescopeSetup(*args, **kwargs)[source]
Bases:
observatory.platform.observatory_environment.ObservatoryTestCase
- class oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.TestJstorTelescopePublisher(*args, **kwargs)[source]
Bases:
observatory.platform.observatory_environment.ObservatoryTestCase
Tests for the Jstor telescope
Constructor which sets up variables used by tests.
- Parameters:
args – arguments.
kwargs – keyword arguments.
- class oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.TestJstorTelescopeCollection(*args, **kwargs)[source]
Bases:
observatory.platform.observatory_environment.ObservatoryTestCase
Tests for the Jstor telescope
- oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.test_get_label_id(self, mock_account_credentials, mock_build)[source]
Test getting label id both when label already exists and does not exist yet.
- oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.publisher_http_mock_sequence(country_report_url, institution_report_url, wrong_publisher_report_url)[source]
Create a list with mocked http responses
- Parameters:
country_report_url (str) – URL to country report
institution_report_url (str) – URL to institution report
wrong_publisher_report_url (str) – URL to report with a non-matching publisher id
- Returns:
List with http responses
- Return type:
list
- oaebu_workflows.jstor_telescope.tests.test_jstor_telescope.collection_http_mock_sequence(country_json, institution_json)[source]
Create a list with mocked http responses for the collection workflow of the telescope
- Parameters:
country_json (str) – The path to the JSON file containing the data for the country message.
institution_json (str) – The path to the JSON file containing the data for the institution message.
- Returns:
A list of tuples representing the HTTP mock responses
- Return type:
list