[ARVADOS] updated: c846f46fa1057b9a5127515cffe7b1c0077b2cd3

Git user git at public.curoverse.com
Thu Apr 21 10:14:33 EDT 2016


Summary of changes:
 sdk/python/arvados/keep.py           | 2 +-
 sdk/python/tests/test_keep_client.py | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

       via  c846f46fa1057b9a5127515cffe7b1c0077b2cd3 (commit)
      from  992ea2dae449a9119e65207ddd2217cbbbab82ed (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 c846f46fa1057b9a5127515cffe7b1c0077b2cd3
Author: radhika <radhika at curoverse.com>
Date:   Thu Apr 21 10:13:15 2016 -0400

    8937: Return True for Head requests in KeepClients. The tests in KeepClientRetryHeadTestCase are failing due to this and need to be worked on.

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 8d9cc3b..3c0ad6f 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -980,7 +980,7 @@ class KeepClient(object):
             self.block_cache.cap_cache()
         if loop.success():
             if method == "HEAD":
-                return "True"
+                return True
             else:
                 return blob
 
diff --git a/sdk/python/tests/test_keep_client.py b/sdk/python/tests/test_keep_client.py
index 04752a6..5fbab7d 100644
--- a/sdk/python/tests/test_keep_client.py
+++ b/sdk/python/tests/test_keep_client.py
@@ -110,7 +110,7 @@ class KeepTestCase(run_test_server.TestCaseWithServers):
             locator,
             '^b9a772c7049325feb7130fff1f8333e9\+9',
             'wrong md5 hash from Keep.put for "test_head": ' + locator)
-        self.assertEqual("True", self.keep_client.head(locator))
+        self.assertEqual(True, self.keep_client.head(locator))
         self.assertEqual(self.keep_client.get(locator),
                          'test_head',
                          'wrong content from Keep.get for "test_head"')
@@ -827,7 +827,7 @@ class KeepClientGatewayTestCase(unittest.TestCase, tutil.ApiClientMock):
         self.assertEqual('foo', self.keepClient.get(locator))
         self.assertEqual(self.gateway_roots[0]+locator,
                          MockCurl.return_value.getopt(pycurl.URL))
-        self.assertEqual("True", self.keepClient.head(locator))
+        self.assertEqual(True, self.keepClient.head(locator))
 
     @mock.patch('pycurl.Curl')
     def test_get_with_gateway_hints_in_order(self, MockCurl):
@@ -893,7 +893,7 @@ class KeepClientGatewayTestCase(unittest.TestCase, tutil.ApiClientMock):
             code=200, body='foo', headers={'Content-Length': 3})
         self.mock_disks_and_gateways()
         locator = 'acbd18db4cc2f85cedef654fccc4a4d8+3+K at xyzzy'
-        self.assertEqual("True", self.keepClient.head(locator))
+        self.assertEqual(True, self.keepClient.head(locator))
         self.assertEqual('https://keep.xyzzy.arvadosapi.com/'+locator,
                          MockCurl.return_value.getopt(pycurl.URL))
 
@@ -1014,7 +1014,7 @@ class KeepClientRetryGetTestCase(KeepClientRetryTestMixin, unittest.TestCase):
 
 @tutil.skip_sleep
 class KeepClientRetryHeadTestCase(KeepClientRetryTestMixin, unittest.TestCase):
-    DEFAULT_EXPECT = "True"
+    DEFAULT_EXPECT = True
     DEFAULT_EXCEPTION = arvados.errors.KeepReadError
     HINTED_LOCATOR = KeepClientRetryTestMixin.TEST_LOCATOR + '+K at xyzzy'
     TEST_PATCHER = staticmethod(tutil.mock_keep_responses)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list