[ARVADOS] updated: 1e368708ad2a2d553f5e716c473767c660b2f805
git at public.curoverse.com
git at public.curoverse.com
Mon Aug 18 14:02:53 EDT 2014
Summary of changes:
sdk/python/arvados/api.py | 5 +----
sdk/python/tests/test_api.py | 5 +++++
2 files changed, 6 insertions(+), 4 deletions(-)
via 1e368708ad2a2d553f5e716c473767c660b2f805 (commit)
via 2e89fc72d3ad55169dbc1acf38cf040592bf25e5 (commit)
from c5f8a89d3b0a8038a31b0af049f3610b6374b6a8 (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 1e368708ad2a2d553f5e716c473767c660b2f805
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Aug 18 14:02:42 2014 -0400
2800: Restore deleted comment which is still relevant.
diff --git a/sdk/python/tests/test_api.py b/sdk/python/tests/test_api.py
index 4917d00..ecb93a8 100644
--- a/sdk/python/tests/test_api.py
+++ b/sdk/python/tests/test_api.py
@@ -31,6 +31,11 @@ class ArvadosApiClientTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
+ # The apiclient library has support for mocking requests for
+ # testing, but it doesn't extend to the discovery document
+ # itself. For now, bring up an API server that will serve
+ # a discovery document.
+ # FIXME: Figure out a better way to stub this out.
run_test_server.run()
mock_responses = {
'arvados.humans.delete': (cls.response_from_code(500), ""),
commit 2e89fc72d3ad55169dbc1acf38cf040592bf25e5
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Aug 18 14:01:54 2014 -0400
2800: Remove unnecessary sha1. Just use the tuple as an array key.
diff --git a/sdk/python/arvados/api.py b/sdk/python/arvados/api.py
index 75247ab..3df2430 100644
--- a/sdk/python/arvados/api.py
+++ b/sdk/python/arvados/api.py
@@ -4,7 +4,6 @@ import logging
import os
import re
import types
-import hashlib
import apiclient
import apiclient.discovery
@@ -135,9 +134,7 @@ def api(version=None, cache=True, host=None, token=None, insecure=False, **kwarg
'https://%s/discovery/v1/apis/{api}/{apiVersion}/rest' % (host,))
if cache:
- connprofile = hashlib.sha1(' '.join([
- version, host, token, ('y' if insecure else 'n')
- ])).hexdigest()
+ connprofile = (version, host, token, insecure)
svc = conncache.get(connprofile)
if svc:
return svc
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list