Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
irux committed Sep 12, 2023
1 parent 4b440b8 commit e301e83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def connector_config(self) -> KafkaConnectorConfig:
}
)


@pytest.mark.asyncio
async def test_should_create_connector_in_dry_run(
self,
Expand All @@ -78,7 +77,6 @@ async def test_should_create_connector_in_dry_run(
handler = self.connector_handler(connector_wrapper)
renderer_diff_mock.return_value = None


await handler.create_connector(connector_config, dry_run=True)
connector_wrapper.get_connector.assert_called_once_with(CONNECTOR_NAME)
connector_wrapper.validate_connector_config.assert_called_once_with(
Expand Down Expand Up @@ -169,11 +167,9 @@ async def test_should_log_correct_message_when_create_connector_and_connector_ex
),
]


@pytest.mark.asyncio
async def test_should_log_invalid_config_when_create_connector_in_dry_run(
self, connector_config: KafkaConnectorConfig, renderer_diff_mock: MagicMock

):
connector_wrapper = AsyncMock()
errors = [
Expand All @@ -190,18 +186,15 @@ async def test_should_log_invalid_config_when_create_connector_in_dry_run(
ConnectorStateException,
match=f"Connector Creation: validating the connector config for connector {CONNECTOR_NAME} resulted in the following errors: {formatted_errors}",
):

await handler.create_connector(connector_config, dry_run=True)

connector_wrapper.validate_connector_config.assert_called_once_with(
connector_config
)


@pytest.mark.asyncio
async def test_should_call_update_connector_config_when_connector_exists_not_dry_run(
self, connector_config: KafkaConnectorConfig

):
connector_wrapper = AsyncMock()

Expand Down
3 changes: 1 addition & 2 deletions tests/components/test_kafka_source_connector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from unittest.mock import AsyncMock, MagicMock

from unittest.mock import MagicMock

import pytest
from pytest_mock import MockerFixture
Expand Down

0 comments on commit e301e83

Please sign in to comment.