[ARVADOS] updated: 2c640b0e791d9997ff87f4ec2b33af7781286af5

Git user git at public.curoverse.com
Fri Aug 5 16:49:50 EDT 2016


Summary of changes:
 sdk/python/tests/test_arv_put.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

       via  2c640b0e791d9997ff87f4ec2b33af7781286af5 (commit)
      from  3a1f0b616382230c32439b8d7e17ff75a132a10d (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 2c640b0e791d9997ff87f4ec2b33af7781286af5
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Fri Aug 5 17:48:59 2016 -0300

    9463: Mock usage corrections on a test that was producing failures on other tests

diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py
index 52063f2..47594ab 100644
--- a/sdk/python/tests/test_arv_put.py
+++ b/sdk/python/tests/test_arv_put.py
@@ -478,12 +478,13 @@ class ArvadosPutTest(run_test_server.TestCaseWithServers, ArvadosBaseTestCase):
         coll_save_mock = mock.Mock(name='arv.collection.Collection().save_new()')
         coll_save_mock.side_effect = arvados.errors.ApiError(
             fake_httplib2_response(403), '{}')
-        arvados.collection.Collection.save_new = coll_save_mock
-        with self.assertRaises(SystemExit) as exc_test:
-            self.call_main_with_args(['/dev/null'])
-        self.assertLess(0, exc_test.exception.args[0])
-        self.assertLess(0, coll_save_mock.call_count)
-        self.assertEqual("", self.main_stdout.getvalue())
+        with mock.patch('arvados.collection.Collection.save_new',
+                        new=coll_save_mock):
+            with self.assertRaises(SystemExit) as exc_test:
+                self.call_main_with_args(['/dev/null'])
+            self.assertLess(0, exc_test.exception.args[0])
+            self.assertLess(0, coll_save_mock.call_count)
+            self.assertEqual("", self.main_stdout.getvalue())
 
 
 class ArvPutIntegrationTest(run_test_server.TestCaseWithServers,

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list