[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Wed Jul 20 15:38:36 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/fc68f7196b18/
changeset:   fc68f7196b18
branch:      release-v1.4.2
user:        dread
date:        2011-07-20 15:47:51
summary:     [tests][xs]: Cope with newer versions of ckanclient.
affected #:  1 file (141 bytes)

--- a/ckan/tests/wsgi_ckanclient.py	Fri Jul 15 17:28:12 2011 +0100
+++ b/ckan/tests/wsgi_ckanclient.py	Wed Jul 20 14:47:51 2011 +0100
@@ -2,7 +2,12 @@
 
 import paste.fixture
 
-from ckanclient import CkanClient, Request, CkanApiError
+from ckanclient import CkanClient, CkanApiError
+try:
+    from ckanclient import ApiRequest
+except ImportError:
+    # older versions of ckanclient
+    from ckanclient import Request as ApiRequest
 
 __all__ = ['WsgiCkanClient', 'ClientError']
 
@@ -27,7 +32,7 @@
         if data != None:
             data = urllib.urlencode({data: 1})
         # Don't use request beyond getting the method
-        req = Request(location, data, headers, method=method)
+        req = ApiRequest(location, data, headers, method=method)
 
         # Make header values ascii strings
         for key, value in headers.items():


http://bitbucket.org/okfn/ckan/changeset/cebccc7f29e7/
changeset:   cebccc7f29e7
branch:      release-v1.4.1
user:        dread
date:        2011-07-20 15:47:51
summary:     [tests][xs]: Cope with newer versions of ckanclient.
affected #:  1 file (141 bytes)

--- a/ckan/tests/wsgi_ckanclient.py	Fri Jul 08 15:46:50 2011 +0100
+++ b/ckan/tests/wsgi_ckanclient.py	Wed Jul 20 14:47:51 2011 +0100
@@ -2,7 +2,12 @@
 
 import paste.fixture
 
-from ckanclient import CkanClient, Request, CkanApiError
+from ckanclient import CkanClient, CkanApiError
+try:
+    from ckanclient import ApiRequest
+except ImportError:
+    # older versions of ckanclient
+    from ckanclient import Request as ApiRequest
 
 __all__ = ['WsgiCkanClient', 'ClientError']
 
@@ -27,7 +32,7 @@
         if data != None:
             data = urllib.urlencode({data: 1})
         # Don't use request beyond getting the method
-        req = Request(location, data, headers, method=method)
+        req = ApiRequest(location, data, headers, method=method)
 
         # Make header values ascii strings
         for key, value in headers.items():

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list