From e2f3d8794682670ff3be6992754b529aad9113c7 Mon Sep 17 00:00:00 2001 From: Li Xuanji Date: Tue, 14 Jun 2016 11:53:00 -0700 Subject: [PATCH] [AIRFLOW-239] Fix tests indentation Fix indentation - previously, due to indentation some methods were treated as internal functions of test_presto_to_mysql and not collected by nosetests. --- tests/core.py | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/tests/core.py b/tests/core.py index bbf9e6089c146..af791e3574b7d 100644 --- a/tests/core.py +++ b/tests/core.py @@ -1587,33 +1587,31 @@ def test_presto(self): task_id='presto_check', sql=sql, dag=self.dag) t.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True) + def test_presto_to_mysql(self): + t = operators.PrestoToMySqlTransfer( + task_id='presto_to_mysql_check', + sql=""" + SELECT name, count(*) as ccount + FROM airflow.static_babynames + GROUP BY name + """, + mysql_table='test_static_babynames', + mysql_preoperator='TRUNCATE TABLE test_static_babynames;', + dag=self.dag) + t.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True) - def test_presto_to_mysql(self): - t = operators.PrestoToMySqlTransfer( - task_id='presto_to_mysql_check', - sql=""" - SELECT name, count(*) as ccount - FROM airflow.static_babynames - GROUP BY name - """, - mysql_table='test_static_babynames', - mysql_preoperator='TRUNCATE TABLE test_static_babynames;', - dag=self.dag) - t.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True) - - - def test_presto_to_mysql(self): - t = operators.PrestoToMySqlTransfer( - task_id='presto_to_mysql_check', - sql=""" - SELECT name, count(*) as ccount - FROM airflow.static_babynames - GROUP BY name - """, - mysql_table='test_static_babynames', - mysql_preoperator='TRUNCATE TABLE test_static_babynames;', - dag=self.dag) - t.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True) + def test_presto_to_mysql(self): + t = operators.PrestoToMySqlTransfer( + task_id='presto_to_mysql_check', + sql=""" + SELECT name, count(*) as ccount + FROM airflow.static_babynames + GROUP BY name + """, + mysql_table='test_static_babynames', + mysql_preoperator='TRUNCATE TABLE test_static_babynames;', + dag=self.dag) + t.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, force=True) def test_hdfs_sensor(self): t = operators.HdfsSensor(