oaebu_workflows.irus_oapen_telescope.tests.test_irus_oapen_telescope

Module Contents

Classes

TestIrusOapenTelescope

Tests for the Oapen Irus Uk telescope

class oaebu_workflows.irus_oapen_telescope.tests.test_irus_oapen_telescope.TestIrusOapenTelescope(*args, **kwargs)[source]

Bases: observatory.platform.observatory_environment.ObservatoryTestCase

Tests for the Oapen Irus Uk telescope

Constructor which sets up variables used by tests. :param args: arguments. :param kwargs: keyword arguments.

test_dag_structure()[source]

Test that the Oapen Irus Uk DAG has the correct structure.

test_dag_load()[source]

Test that the Oapen Irus Uk DAG can be loaded from a DAG bag.

test_telescope(mock_authorized_session, mock_account_credentials, mock_build)[source]

Test the Oapen Irus Uk telescope end to end.

test_create_cloud_function(mock_create_function, mock_function_exists, mock_upload, mock_variable_get)[source]

Test the create_cloud_function method of the IrusOapenRelease

Parameters:

mock_variable_get – Mock Airflow Variable ‘data’

test_call_cloud_function(mock_function_exists, mock_call_function, mock_conn_get, mock_variable_get)[source]

Test the call_cloud_function method of the IrusOapenRelease

Parameters:

mock_variable_get – Mock Airflow Variable ‘data’

test_upload_source_code_to_bucket(mock_create_bucket, mock_upload_to_bucket)[source]

Test getting source code from oapen irus uk release and uploading to storage bucket. Test expected results both when md5 hashes match and when they don’t.

test_cloud_function_exists()[source]

Test the function that checks whether the cloud function exists

test_create_cloud_function()[source]

Test the function that creates the cloud function

test_call_cloud_function(mock_authorized_session)[source]

Test the function that calls the cloud function