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

Bitbucket commits-noreply at bitbucket.org
Wed Aug 10 15:44:09 UTC 2011


3 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/93bdfde8455c/
changeset:   93bdfde8455c
user:        dread
date:        2011-08-09 19:06:49
summary:     [tests][xs]: Added extra search test for normal syntax.
affected #:  1 file (183 bytes)

--- a/ckan/tests/functional/api/test_package_search.py	Tue Aug 09 14:40:25 2011 +0100
+++ b/ckan/tests/functional/api/test_package_search.py	Tue Aug 09 18:06:49 2011 +0100
@@ -207,6 +207,11 @@
         assert anna_rec['ratings_average'] == 3.0, anna_rec['ratings_average']
         assert anna_rec['ratings_count'] == 1, anna_rec['ratings_count']
 
+        # try alternative syntax
+        offset = self.base_url + '?q=russian&all_fields=1'
+        res2 = self.app.get(offset, status=200)
+        assert_equal(res2.body, res.body)
+
     def test_08_all_fields_syntax_error(self):
         offset = self.base_url + '?all_fields=should_be_boolean' # invalid all_fields value
         res = self.app.get(offset, status=400)


http://bitbucket.org/okfn/ckan/changeset/92415104d639/
changeset:   92415104d639
branch:      defect-1172-exceptions
user:        dread
date:        2011-08-10 17:36:57
summary:     [lib,model]: Took out all the excepts that worry me. Breaks some tests - need to assess what to do.
affected #:  3 files (179 bytes)

--- a/ckan/lib/cli.py	Fri Aug 05 15:39:03 2011 +0100
+++ b/ckan/lib/cli.py	Wed Aug 10 16:36:57 2011 +0100
@@ -38,9 +38,7 @@
             msg = 'No config file supplied'
             raise self.BadCommand(msg)
         self.filename = os.path.abspath(self.options.config)
-        try:
-            fileConfig(self.filename)
-        except Exception: pass
+        fileConfig(self.filename)
         conf = appconfig('config:' + self.filename)
         load_environment(conf.global_conf, conf.local_conf)
 


--- a/ckan/lib/search/worker.py	Fri Aug 05 15:39:03 2011 +0100
+++ b/ckan/lib/search/worker.py	Wed Aug 10 16:36:57 2011 +0100
@@ -26,6 +26,7 @@
             log.warn("Unknown operation: %s" % operation)
     except Exception, ex:
         log.exception(ex)
+        raise
 
 
 class SynchronousSearchPlugin(SingletonPlugin):


--- a/ckan/model/package.py	Fri Aug 05 15:39:03 2011 +0100
+++ b/ckan/model/package.py	Wed Aug 10 16:36:57 2011 +0100
@@ -335,11 +335,7 @@
     def get_license(self):
         license = None
         if self.license_id:
-            try:
-                license = self.get_license_register()[self.license_id]
-            except Exception, inst:
-                # Todo: Log a warning.
-                pass
+            license = self.get_license_register()[self.license_id]
         return license
 
     def set_license(self, license):


http://bitbucket.org/okfn/ckan/changeset/6dbdb8e03e05/
changeset:   6dbdb8e03e05
user:        dread
date:        2011-08-10 17:43:56
summary:     [merge]
affected #:  1 file (183 bytes)

--- a/ckan/tests/functional/api/test_package_search.py	Wed Aug 10 16:35:59 2011 +0100
+++ b/ckan/tests/functional/api/test_package_search.py	Wed Aug 10 16:43:56 2011 +0100
@@ -207,6 +207,11 @@
         assert anna_rec['ratings_average'] == 3.0, anna_rec['ratings_average']
         assert anna_rec['ratings_count'] == 1, anna_rec['ratings_count']
 
+        # try alternative syntax
+        offset = self.base_url + '?q=russian&all_fields=1'
+        res2 = self.app.get(offset, status=200)
+        assert_equal(res2.body, res.body)
+
     def test_08_all_fields_syntax_error(self):
         offset = self.base_url + '?all_fields=should_be_boolean' # invalid all_fields value
         res = self.app.get(offset, status=400)

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