about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2016-05-06 12:42:58 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2016-05-06 12:49:10 +0200
commit8729bd8bb99ee47abb788590eb6a9260fbdc64ca (patch)
treed58a45f17ff9d67caf65a16ffbd1f25095afe262
parente8803166ef34515010cdf85f0b569d674a19bd84 (diff)
downloadnixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.tar
nixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.tar.gz
nixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.tar.bz2
nixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.tar.lz
nixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.tar.xz
nixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.tar.zst
nixlib-8729bd8bb99ee47abb788590eb6a9260fbdc64ca.zip
pythonPackages.boto3: enable tests, fixes #14985
I've modified #14985 by @adnelson to take into account the update in
b68f09a520371dd53fd1ab370935a2d8001700b3
-rw-r--r--pkgs/top-level/python-packages.nix19
1 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index a32883317ccd..97f6111b5c7d 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2490,16 +2490,17 @@ in modules // {
       sha256 = "1rbwcslk9dgayrg3vy3m0bqj767hdy1aphy5wjgz925bsydgxdg6";
     };
 
-    propagatedBuildInputs = [ self.botocore
-                              self.jmespath
-                            ] ++ (if isPy3k then [] else [self.futures_2_2]);
+    propagatedBuildInputs = [ self.botocore self.jmespath ] ++
+                            (if isPy3k then [] else [self.futures_2_2]);
     buildInputs = [ self.docutils self.nose self.mock ];
-
-    # Tests are failing with `botocore.exceptions.NoCredentialsError:
-    # Unable to locate credentials`. There also seems to be some mock
-    # issues (`assert_called_once` doesn't exist in mock but boto
-    # seems to think it is?).
-    doCheck = false;
+    checkPhase = ''
+      runHook preCheck
+      # This method is not in mock. It might have appeared in some versions.
+      sed -i 's/action.assert_called_once()/self.assertEqual(action.call_count, 1)/' \
+        tests/unit/resources/test_factory.py
+      nosetests -d tests/unit --verbose
+      runHook postCheck
+    '';
 
     meta = {
       homepage = https://github.com/boto3/boto;