[ARVADOS] updated: 73bfa6243c359171d13c791c48195ade6bbf7520

git at public.curoverse.com git at public.curoverse.com
Mon Aug 24 11:17:46 EDT 2015


Summary of changes:
 sdk/python/tests/test_init.py      |  2 +-
 sdk/python/tests/test_init_temp.py | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 sdk/python/tests/test_init_temp.py

       via  73bfa6243c359171d13c791c48195ade6bbf7520 (commit)
      from  22e1fd1a6ef65e6cdcb58cba48657497b9e37be9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 73bfa6243c359171d13c791c48195ade6bbf7520
Author: Bryan Cosca <bcosc at curoverse.com>
Date:   Mon Aug 24 11:17:39 2015 -0400

    added test_init_temp for a shorter version of test_init without pseudocode

diff --git a/sdk/python/tests/test_init.py b/sdk/python/tests/test_init.py
index 98bc43e..533548e 100644
--- a/sdk/python/tests/test_init.py
+++ b/sdk/python/tests/test_init.py
@@ -18,7 +18,7 @@ class SDKTestCase(unittest.TestCase, tutil.ApiClientMock):
     def test_mock_keep_responses_works(self):
         api_client = mock.MagicMock()
         req_mock = tutil.mock_keep_responses("retry error reporting test", 500, 500, 403, 403)
-        with req_mock, self.assertRaises(arvados.errors.ApiError) as err_check:
+        with req_mock, self.assertRaises(arvados.errors.HttpError) as err_check:
             arvados.task_set_output({'uuid':'zzzzz-zzzzz-zzzzzzzzzzzzzzz'},s='7idummyhashb0b1f1f03e4e6f69c4a4e+28243',api_client=api_client)
             self.assertEqual(err_check,False) # Need a spy assert to see why ApiError/HttpError isn't getting called
 
diff --git a/sdk/python/tests/test_init_temp.py b/sdk/python/tests/test_init_temp.py
new file mode 100644
index 0000000..7b5bf66
--- /dev/null
+++ b/sdk/python/tests/test_init_temp.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python   
+
+import mock
+import os
+import unittest
+
+import arvados
+import arvados.collection
+import arvados_testutil as tutil
+import run_test_server
+from arvados_testutil import FakeCurl
+from arvados_testutil import queue_with
+from arvados_testutil import mock_responses
+
+ at tutil.skip_sleep
+class SDKTestCase(unittest.TestCase, tutil.ApiClientMock):
+
+    def test_mock_keep_responses_works(self):
+        api_client = mock.MagicMock()
+        req_mock = tutil.mock_keep_responses("retry error reporting test", 403)
+        with req_mock, self.assertRaises(arvados.errors.HttpError) as err_check:
+            arvados.task_set_output({'uuid':'zzzzz-zzzzz-zzzzzzzzzzzzzzz'},s='7idummyhashb0b1f1f03e4e6f69c4a4e+28243',api_client=api_client)
+            self.assertEqual(err_check,err_check.exception.request_errors()) # Need a spy assert to see why ApiError/HttpError isn't getting called

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list