[med-svn] [python-fitbit] 03/06: Disabling tests, they all seem to need network access.

Iain R. Learmonth irl at moszumanska.debian.org
Mon Apr 4 19:02:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

irl pushed a commit to branch master
in repository python-fitbit.

commit c71a3b1b2fb66a2ab37ec03f9cf4fb93cf794a16
Author: Iain R. Learmonth <irl at debian.org>
Date:   Mon Apr 4 19:09:54 2016 +0100

    Disabling tests, they all seem to need network access.
---
 debian/patches/0002-fix_tests_for_nose.patch | 52 ----------------------------
 debian/patches/disable_auth_test.patch       | 21 -----------
 debian/patches/series                        |  2 --
 debian/rules                                 |  2 +-
 4 files changed, 1 insertion(+), 76 deletions(-)

diff --git a/debian/patches/0002-fix_tests_for_nose.patch b/debian/patches/0002-fix_tests_for_nose.patch
deleted file mode 100644
index c83d5eb..0000000
--- a/debian/patches/0002-fix_tests_for_nose.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Olivier Sallou <osallou at debian.org>
-Date: Sat, 22 Aug 2015 14:02:40 +0000
-Subject: fix_tests_for_nose
-
-To make tests ok with nose, we need to adapt a little the way to execute tests.
-mock version may also have an impact and I needed to manage method call with no parameter.
----
- fitbit_tests/__init__.py | 21 ---------------------
- fitbit_tests/test_api.py |  4 +++-
- 2 files changed, 3 insertions(+), 22 deletions(-)
-
-diff --git a/fitbit_tests/__init__.py b/fitbit_tests/__init__.py
-index a507c66..e69de29 100644
---- a/fitbit_tests/__init__.py
-+++ b/fitbit_tests/__init__.py
-@@ -1,21 +0,0 @@
--import unittest
--from .test_exceptions import ExceptionTest
--from .test_auth import AuthTest
--from .test_api import APITest, CollectionResourceTest, DeleteCollectionResourceTest, MiscTest
--
--
--def all_tests(consumer_key="", consumer_secret="", user_key=None, user_secret=None):
--    kwargs = {
--        "consumer_key": consumer_key,
--        "consumer_secret": consumer_secret,
--        "user_key": user_key,
--        "user_secret": user_secret,
--    }
--    suite = unittest.TestSuite()
--    suite.addTest(unittest.makeSuite(ExceptionTest))
--    #suite.addTest(unittest.makeSuite(AuthTest))
--    suite.addTest(unittest.makeSuite(APITest))
--    suite.addTest(unittest.makeSuite(CollectionResourceTest))
--    suite.addTest(unittest.makeSuite(DeleteCollectionResourceTest))
--    suite.addTest(unittest.makeSuite(MiscTest))
--    return suite
-diff --git a/fitbit_tests/test_api.py b/fitbit_tests/test_api.py
-index bef4aa0..3ec4d51 100644
---- a/fitbit_tests/test_api.py
-+++ b/fitbit_tests/test_api.py
-@@ -11,7 +11,9 @@ class TestBase(TestCase):
-     def setUp(self):
-         self.fb = Fitbit('x', 'y')
- 
--    def common_api_test(self, funcname, args, kwargs, expected_args, expected_kwargs):
-+    def common_api_test(self, funcname=None, args=None, kwargs=None, expected_args=None, expected_kwargs=None):
-+        if funcname is None:
-+            return
-         # Create a fitbit object, call the named function on it with the given
-         # arguments and verify that make_request is called with the expected args and kwargs
-         with mock.patch.object(self.fb, 'make_request') as make_request:
diff --git a/debian/patches/disable_auth_test.patch b/debian/patches/disable_auth_test.patch
deleted file mode 100644
index 0deb4da..0000000
--- a/debian/patches/disable_auth_test.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Date: Sat, 22 Aug 2015 12:52:19 +0000
-Subject: disable_auth_test
-
----
- fitbit_tests/__init__.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fitbit_tests/__init__.py b/fitbit_tests/__init__.py
-index e3e0700..a507c66 100644
---- a/fitbit_tests/__init__.py
-+++ b/fitbit_tests/__init__.py
-@@ -13,7 +13,7 @@ def all_tests(consumer_key="", consumer_secret="", user_key=None, user_secret=No
-     }
-     suite = unittest.TestSuite()
-     suite.addTest(unittest.makeSuite(ExceptionTest))
--    suite.addTest(unittest.makeSuite(AuthTest))
-+    #suite.addTest(unittest.makeSuite(AuthTest))
-     suite.addTest(unittest.makeSuite(APITest))
-     suite.addTest(unittest.makeSuite(CollectionResourceTest))
-     suite.addTest(unittest.makeSuite(DeleteCollectionResourceTest))
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9a10fd5..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-disable_auth_test.patch
-0002-fix_tests_for_nose.patch
diff --git a/debian/rules b/debian/rules
index 131e68c..15e8187 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,4 +12,4 @@ override_dh_auto_build:
 	dh $@ --with python2 --buildsystem=pybuild
 
 override_dh_auto_test:
-	nosetests
+	echo "Skipping tests: Tests require network access..."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-fitbit.git



More information about the debian-med-commit mailing list