[ckan-changes] commit/ckan: kindly: [dictization] #1376 fix dictization test and make sure current flag set properly

Bitbucket commits-noreply at bitbucket.org
Sat Oct 8 16:19:28 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/39acf62f30b0/
changeset:   39acf62f30b0
user:        kindly
date:        2011-10-08 17:40:09
summary:     [dictization] #1376 fix dictization test and make sure current flag set properly
affected #:  2 files (-1 bytes)

--- a/ckan/model/meta.py	Wed Oct 05 10:36:34 2011 +0100
+++ b/ckan/model/meta.py	Sat Oct 08 16:40:09 2011 +0100
@@ -38,6 +38,8 @@
             revision = session.revision
         except AttributeError:
             return
+        if getattr(session, 'revisioning_disabled', False):
+            return
         new = obj_cache['new']
         changed = obj_cache['changed']
         deleted = obj_cache['deleted']


--- a/ckan/tests/lib/test_dictization.py	Wed Oct 05 10:36:34 2011 +0100
+++ b/ckan/tests/lib/test_dictization.py	Sat Oct 08 16:40:09 2011 +0100
@@ -544,10 +544,12 @@
 
     def test_12_make_active(self):
 
+        model.repo.new_revision()
         anna1 = model.Session.query(model.Package).filter_by(name='annakarenina_changed2').one()
         context = {"model": model,
                    "session": model.Session,
                    'user': 'testsysadmin'}
+
         make_latest_pending_package_active(context, {'id': anna1.id})
 
         pkgrevisions = model.Session.query(model.PackageRevision).filter_by(id=anna1.id).all()

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