Skip to content

Commit

Permalink
[BUGFIX] Patch broken Cloud test blocking 0.15.49 release (#7177)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdkini authored Feb 17, 2023
1 parent 7d98b16 commit 7827b3f
Showing 1 changed file with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,18 @@
from great_expectations.data_context.types.refs import GXCloudResourceRef
from great_expectations.render import RenderedAtomicContent
from great_expectations.validator.validator import Validator
from great_expectations.data_context import CloudDataContext


@pytest.mark.cloud
@pytest.mark.integration
@pytest.mark.parametrize(
"data_context_fixture_name",
[
# In order to leverage existing fixtures in parametrization, we provide
# their string names and dynamically retrieve them using pytest's built-in
# `request` fixture.
# Source: https://stackoverflow.com/a/64348247
pytest.param(
"empty_base_data_context_in_cloud_mode",
id="BaseDataContext",
),
pytest.param("empty_data_context_in_cloud_mode", id="DataContext"),
pytest.param("empty_cloud_data_context", id="CloudDataContext"),
],
)
def test_cloud_backed_data_context_save_expectation_suite_include_rendered_content(
data_context_fixture_name: str,
request,
empty_cloud_data_context: CloudDataContext,
) -> None:
"""
All Cloud-backed contexts (DataContext, BaseDataContext, and CloudDataContext) should save an ExpectationSuite
with rendered_content by default.
Cloud-backed contexts should save an ExpectationSuite with rendered_content by default.
"""
context = request.getfixturevalue(data_context_fixture_name)
context = empty_cloud_data_context

ge_cloud_id = "d581305a-cdce-483b-84ba-5c673d2ce009"
cloud_ref = GXCloudResourceRef(
Expand Down Expand Up @@ -70,7 +54,7 @@ def test_cloud_backed_data_context_save_expectation_suite_include_rendered_conte
), mock.patch(
"great_expectations.data_context.store.gx_cloud_store_backend.GXCloudStoreBackend._update"
) as mock_update:
context.add_expectation_suite(
context.save_expectation_suite(
expectation_suite=expectation_suite,
)

Expand Down

0 comments on commit 7827b3f

Please sign in to comment.