[ckan-changes] commit/ckanext-solr: John Glover: Add teardown_class method to synchronous search test

Bitbucket commits-noreply at bitbucket.org
Wed Aug 17 13:50:52 UTC 2011


1 new changeset in ckanext-solr:

http://bitbucket.org/okfn/ckanext-solr/changeset/4ff6fec11316/
changeset:   4ff6fec11316
user:        John Glover
date:        2011-08-17 15:50:24
summary:     Add teardown_class method to synchronous search test
affected #:  1 file (137 bytes)

--- a/tests/test_package_search_synchronous_update.py	Tue Aug 16 18:13:36 2011 +0100
+++ b/tests/test_package_search_synchronous_update.py	Wed Aug 17 14:50:24 2011 +0100
@@ -48,6 +48,11 @@
             }
         }
 
+    @classmethod
+    def teardown_class(cls):
+        model.repo.rebuild_db()
+        search.get_backend().index_for('Package').clear()
+
     def _create_package(self, package=None):
         rev = model.repo.new_revision()
         rev.author = u'tester'

Repository URL: https://bitbucket.org/okfn/ckanext-solr/

--

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