airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-1210] Enable DbApiHook unit tests
Date Wed, 17 May 2017 19:03:51 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master f9ffbbd91 -> a379cc1bc


[AIRFLOW-1210] Enable DbApiHook unit tests

Closes #2302 from skudriashev/airflow-1210


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/a379cc1b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/a379cc1b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/a379cc1b

Branch: refs/heads/master
Commit: a379cc1bcb19061d2fb42a308d66e6c446e36a51
Parents: f9ffbbd
Author: Stanislav Kudriashev <stas.kudriashev@gmail.com>
Authored: Wed May 17 21:03:44 2017 +0200
Committer: Bolke de Bruin <bolke@xs4all.nl>
Committed: Wed May 17 21:03:44 2017 +0200

----------------------------------------------------------------------
 tests/hooks/__init__.py        | 13 +++++++++++++
 tests/hooks/test_dbapi_hook.py |  5 ++---
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/a379cc1b/tests/hooks/__init__.py
----------------------------------------------------------------------
diff --git a/tests/hooks/__init__.py b/tests/hooks/__init__.py
new file mode 100644
index 0000000..9d7677a
--- /dev/null
+++ b/tests/hooks/__init__.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/a379cc1b/tests/hooks/test_dbapi_hook.py
----------------------------------------------------------------------
diff --git a/tests/hooks/test_dbapi_hook.py b/tests/hooks/test_dbapi_hook.py
index f9e7b37..c770955 100644
--- a/tests/hooks/test_dbapi_hook.py
+++ b/tests/hooks/test_dbapi_hook.py
@@ -56,8 +56,7 @@ class TestDbApiHook(unittest.TestCase):
                 ("world",)]
         
         self.cur.fetchall.return_value = rows
-        
-        
+
         self.assertEqual(rows, self.db_hook.get_records(statement, parameters))
         
         self.conn.close.assert_called_once()
@@ -73,4 +72,4 @@ class TestDbApiHook(unittest.TestCase):
         
         self.conn.close.assert_called_once()
         self.cur.close.assert_called_once()
-        self.cur.execute.assert_called_once_with(statement)
\ No newline at end of file
+        self.cur.execute.assert_called_once_with(statement)


Mime
View raw message