Differential D6164 Diff 30381 python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_pipeline_snapshot.py
Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_pipeline_snapshot.py
import pytest | import pytest | ||||
from dagster import execute_pipeline | from dagster import execute_pipeline | ||||
from dagster.seven import json, mock | from dagster.seven import json, mock | ||||
from dagster_graphql.implementation.fetch_pipelines import ( | from dagster_graphql.implementation.fetch_pipelines import _get_pipeline_snapshot_from_instance | ||||
_get_dauphin_pipeline_snapshot_from_instance, | |||||
) | |||||
from dagster_graphql.implementation.utils import UserFacingGraphQLError | from dagster_graphql.implementation.utils import UserFacingGraphQLError | ||||
from dagster_graphql.test.utils import ( | from dagster_graphql.test.utils import ( | ||||
execute_dagster_graphql, | execute_dagster_graphql, | ||||
main_repo_location_name, | main_repo_location_name, | ||||
main_repo_name, | main_repo_name, | ||||
) | ) | ||||
from .setup import noop_pipeline | from .setup import noop_pipeline | ||||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | |||||
def test_temporary_error_or_deletion_after_instance_check(): | def test_temporary_error_or_deletion_after_instance_check(): | ||||
instance = mock.MagicMock() | instance = mock.MagicMock() | ||||
instance.has_historical_pipeline.return_value = True | instance.has_historical_pipeline.return_value = True | ||||
instance.get_historical_pipeline.return_value = None | instance.get_historical_pipeline.return_value = None | ||||
with pytest.raises(UserFacingGraphQLError): | with pytest.raises(UserFacingGraphQLError): | ||||
_get_dauphin_pipeline_snapshot_from_instance(instance, "kjdkfjd") | _get_pipeline_snapshot_from_instance(instance, "kjdkfjd") |