Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions providers/telegram/tests/unit/telegram/hooks/test_telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import airflow
from airflow.models import Connection
from airflow.providers.telegram.hooks.telegram import TelegramHook
from airflow.utils import db

pytestmark = pytest.mark.db_test

Expand All @@ -44,21 +43,22 @@ def telegram_error_side_effect(*args, **kwargs):


class TestTelegramHook:
def setup_method(self):
db.merge_conn(
@pytest.fixture(autouse=True)
def setup_connections(self, create_connection_without_db):
create_connection_without_db(
Connection(
conn_id="telegram-webhook-without-token",
conn_type="http",
)
)
db.merge_conn(
create_connection_without_db(
Connection(
conn_id="telegram_default",
conn_type="http",
password=TELEGRAM_TOKEN,
)
)
db.merge_conn(
create_connection_without_db(
Connection(
conn_id="telegram-webhook-with-chat_id",
conn_type="http",
Expand Down