[ckan-changes] commit/ckanclient: dread: [tests]: Added test for search options.

Bitbucket commits-noreply at bitbucket.org
Tue Aug 9 14:54:12 UTC 2011


1 new changeset in ckanclient:

http://bitbucket.org/okfn/ckanclient/changeset/d8f29cc3ef10/
changeset:   d8f29cc3ef10
user:        dread
date:        2011-08-09 16:53:59
summary:     [tests]: Added test for search options.
affected #:  1 file (677 bytes)

--- a/ckanclient/tests/test_ckanclient.py	Wed Jul 20 15:24:11 2011 +0100
+++ b/ckanclient/tests/test_ckanclient.py	Tue Aug 09 15:53:59 2011 +0100
@@ -256,6 +256,21 @@
         assert set(all_results) >= set([u'annakarenina', u'warandpeace']), all_results
         assert res['count'] >= 2, '%r %r' % (res, all_results)
 
+    def test_10_pkg_search_options(self):
+        res = self.c.package_search(None, search_options={'groups': 'roger'})
+        status = self.c.last_status
+        assert status == 200, status
+        assert_equal(list(res['results']), [u'annakarenina'])
+        assert_equal(res['count'], 1)
+
+    def test_10_pkg_search_options_all_fields(self):
+        res = self.c.package_search(None, search_options={'groups': 'roger',
+                                                          'all_fields': True})
+        status = self.c.last_status
+        assert status == 200, status
+        assert_equal(list(res['results']), [u'annakarenina'])
+        assert_equal(res['count'], 1)
+
     def test_11_package_relationship_post(self):
         res = self.c.package_relationship_register_get('annakarenina')
         assert self.c.last_status == 200, self.c.last_status

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

--

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