[ARVADOS] updated: 992ea2dae449a9119e65207ddd2217cbbbab82ed

Git user git at public.curoverse.com
Wed Apr 20 18:29:39 EDT 2016


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

       via  992ea2dae449a9119e65207ddd2217cbbbab82ed (commit)
      from  befbfe55b13686630fd6f841caaa8345d465fc44 (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 992ea2dae449a9119e65207ddd2217cbbbab82ed
Author: radhika <radhika at curoverse.com>
Date:   Wed Apr 20 18:28:19 2016 -0400

    8937: test updates

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 135d985..8d9cc3b 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -432,7 +432,7 @@ class KeepClient(object):
                 _logger.info("HEAD %s: %s bytes",
                          self._result['status_code'],
                          self._result.get('content-length'))
-                return str(self._result.get('content-length'))
+                return True
 
             _logger.info("GET %s: %s bytes in %s msec (%.3f MiB/sec)",
                          self._result['status_code'],
@@ -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 fa82dcc..04752a6 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