def setUp(self, session=None): clear_db_connections(add_default_connections_back=False) merge_conn( Connection( conn_id="airflow_db", conn_type="mysql", description="mysql conn description", host="mysql", login="******", password="******", schema="airflow", ), session, ) merge_conn( Connection( conn_id="druid_broker_default", conn_type="druid", description="druid-broker conn description", host="druid-broker", port=8082, extra='{"endpoint": "druid/v2/sql"}', ), session, ) self.parser = cli_parser.get_parser()
def provide_azure_fileshare_with_directory(): with create_session() as session: wasb_conn_id = Connection( conn_id=CONN_ID, conn_type='https', login=AZURE_LOGIN, password=AZURE_KEY, ) session.add(wasb_conn_id) # pylint: disable=expression-not-assigned with provide_azure_fileshare( share_name=AZURE_SHARE_NAME, wasb_conn_id=CONN_ID, file_name=AZURE_FILE_NAME, directory=AZURE_DIRECTORY_NAME, ): yield clear_db_connections()
def tearDown(self) -> None: clear_db_connections() clear_db_variables()
def tearDown(self) -> None: clear_db_connections()
def tearDownClass(cls): clear_db_connections()
def setUpClass(cls): cls.parser = cli_parser.get_parser() clear_db_connections()
def tearDown(self): clear_db_connections()
def setUp(self): self.parser = cli_parser.get_parser() clear_db_connections()
def setUp(self) -> None: self.client = self.app.test_client() # type:ignore # we want only the connection created here for this test clear_db_connections(False)
def setUpClass(cls): cls.parser = cli_parser.get_parser() clear_db_connections(add_default_connections_back=False)
def tearDownClass(cls) -> None: clear_db_connections()
def setUpClass(cls) -> None: unique_suffix = ''.join(random.sample(string.ascii_lowercase, 16)) cls.bucket_name = f"airflow-gcs-task-handler-tests-{unique_suffix}" # type: ignore cls.create_gcs_bucket(cls.bucket_name) # type: ignore clear_db_connections()
def setUp(self): self.parser = cli.CLIFactory.get_parser() clear_db_connections()
def setUpClass(cls): cls.parser = cli.CLIFactory.get_parser() clear_db_connections()
def teardown_method(self) -> None: clear_db_connections()
def setup_attrs(self, configured_app) -> None: self.app = configured_app self.client = self.app.test_client() # type:ignore # we want only the connection created here for this test clear_db_connections(False)