mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-18 13:38:23 +00:00
chore(ingest): cleanup unused files/vars in tests (#7450)
This commit is contained in:
parent
62e33e03a3
commit
3b8b5e8aa4
File diff suppressed because one or more lines are too long
@ -30,9 +30,7 @@ def get_default_recipe(
|
|||||||
|
|
||||||
@freeze_time(FROZEN_TIME)
|
@freeze_time(FROZEN_TIME)
|
||||||
@pytest.mark.integration
|
@pytest.mark.integration
|
||||||
def test_glossary_ingest(
|
def test_glossary_ingest(mock_datahub_graph, pytestconfig, tmp_path, mock_time):
|
||||||
mock_datahub_graph, docker_compose_runner, pytestconfig, tmp_path, mock_time
|
|
||||||
):
|
|
||||||
test_resources_dir = pytestconfig.rootpath / "tests/integration/business-glossary"
|
test_resources_dir = pytestconfig.rootpath / "tests/integration/business-glossary"
|
||||||
|
|
||||||
# These paths change from one instance run of the clickhouse docker to the other,
|
# These paths change from one instance run of the clickhouse docker to the other,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
from datahub.ingestion.graph.client import DataHubGraph, DataHubGraphConfig
|
from datahub.ingestion.graph.client import DatahubClientConfig, DataHubGraph
|
||||||
from datahub.metadata.schema_classes import CorpUserEditableInfoClass
|
from datahub.metadata.schema_classes import CorpUserEditableInfoClass
|
||||||
|
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ from datahub.metadata.schema_classes import CorpUserEditableInfoClass
|
|||||||
@patch("datahub.emitter.rest_emitter.DataHubRestEmitter.test_connection")
|
@patch("datahub.emitter.rest_emitter.DataHubRestEmitter.test_connection")
|
||||||
def test_get_aspect(mock_test_connection):
|
def test_get_aspect(mock_test_connection):
|
||||||
mock_test_connection.return_value = {}
|
mock_test_connection.return_value = {}
|
||||||
graph = DataHubGraph(DataHubGraphConfig())
|
graph = DataHubGraph(DatahubClientConfig())
|
||||||
user_urn = "urn:li:corpuser:foo"
|
user_urn = "urn:li:corpuser:foo"
|
||||||
with patch("requests.Session.get") as mock_get:
|
with patch("requests.Session.get") as mock_get:
|
||||||
mock_response = Mock()
|
mock_response = Mock()
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import re
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import regex
|
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
|
||||||
from datahub.entrypoints import datahub
|
from datahub.entrypoints import datahub
|
||||||
@ -37,7 +37,7 @@ def test_cli_logging(tmp_path):
|
|||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
|
|
||||||
# The output should include the stdout and stderr, formatted as expected.
|
# The output should include the stdout and stderr, formatted as expected.
|
||||||
regex.match(
|
re.match(
|
||||||
r"""\
|
r"""\
|
||||||
this is a print statement
|
this is a print statement
|
||||||
this is a click.echo statement
|
this is a click.echo statement
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user