コード例 #1
0
def test_consistent_name_anonymization(in_memory_data_context_config_usage_stats_enabled, monkeypatch):
    monkeypatch.delenv("GE_USAGE_STATS", raising=False)  # Undo the project-wide test default
    context = BaseDataContext(in_memory_data_context_config_usage_stats_enabled)
    assert context.data_context_id == "00000000-0000-0000-0000-000000000001"
    payload = run_validation_operator_usage_statistics(
        context, "action_list_operator",
        assets_to_validate=[({"__fake_batch_kwargs": "mydatasource"}, "__fake_expectation_suite_name")], run_id="foo")
    # For a *specific* data_context_id, all names will be consistently anonymized
    assert payload["anonymized_operator_name"] == 'e079c942d946b823312054118b3b6ef4'
コード例 #2
0
def test_consistent_name_anonymization(
        in_memory_data_context_config_usage_stats_enabled):
    context = BaseDataContext(
        in_memory_data_context_config_usage_stats_enabled)
    assert context.data_context_id == "6a52bdfa-e182-455b-a825-e69f076e67d6"
    payload = run_validation_operator_usage_statistics(
        context,
        "action_list_operator",
        assets_to_validate=[({
            "__fake_batch_kwargs": "mydatasource"
        }, "__fake_expectation_suite_name")],
        run_id="foo")
    # For a *specific* data_context_id, all names will be consistently anonymized
    assert payload[
        "anonymized_operator_name"] == '5bb011891aa7d41401e57759d5f5cb01'