[silva.core.smi][Sylvain Viollon] Fix test setup.
[email protected] Tue, 08 Oct 2013 15:06:07 +0200
| Newsgroups | gmane.comp.web.zope.silva.cvs |
|---|---|
| Message-ID | <[email protected]> |
author: Sylvain Viollon
date: Tue Oct 08 15:06:04 2013 +0200
revision: 700:21a4d3bd5ee1 in silva.core.smi
branch: 2.4
details: https://hg.infrae.com/silva.core.smi?cmd=changeset;node=21a4d3bd5ee1
modified: src/silva/core/smi/tests/test_func_autotoc.py src/silva/core/smi/tests/test_func_folder.py src/silva/core/smi/tests/test_func_folder_toolbar.py src/silva/core/smi/tests/test_func_ghost.py src/silva/core/smi/tests/test_func_ghost_folder.py src/silva/core/smi/tests/test_func_indexer.py src/silva/core/smi/tests/test_func_link.py src/silva/core/smi/tests/test_func_publication.py src/silva/core/smi/tests/test_func_publish.py src/silva/core/smi/tests/test_func_publish_toolbar.py src/silva/core/smi/tests/test_rest_folder.py src/silva/core/smi/tests/test_rest_references.py
added:
removed:
log: Fix test setup.
diffstat:
src/silva/core/smi/tests/test_func_autotoc.py | 4 +-
src/silva/core/smi/tests/test_func_folder.py | 22 +++++++++---------
src/silva/core/smi/tests/test_func_folder_toolbar.py | 6 ++--
src/silva/core/smi/tests/test_func_ghost.py | 4 +-
src/silva/core/smi/tests/test_func_ghost_folder.py | 4 +-
src/silva/core/smi/tests/test_func_indexer.py | 6 ++--
src/silva/core/smi/tests/test_func_link.py | 4 +-
src/silva/core/smi/tests/test_func_publication.py | 14 ++++++------
src/silva/core/smi/tests/test_func_publish.py | 6 ++--
src/silva/core/smi/tests/test_func_publish_toolbar.py | 4 +-
src/silva/core/smi/tests/test_rest_folder.py | 4 +-
src/silva/core/smi/tests/test_rest_references.py | 4 +-
12 files changed, 41 insertions(+), 41 deletions(-)
diffs (405 lines):
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_autotoc.py
--- a/src/silva/core/smi/tests/test_func_autotoc.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_autotoc.py Tue Oct 08 15:06:04 2013 +0200
@@ -7,7 +7,7 @@
from silva.core.interfaces import IAutoTOC
from zope.interface.verify import verifyObject
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
@@ -17,7 +17,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addAutoTOC('contents', 'Table of Content')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_folder.py
--- a/src/silva/core/smi/tests/test_func_folder.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_folder.py Tue Oct 08 15:06:04 2013 +0200
@@ -3,7 +3,7 @@
# See also LICENSE.txt
import unittest
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
@@ -13,7 +13,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Folder')
@@ -165,7 +165,7 @@
def test_folder_feeds(self):
"""Test feeds settings. An author doesn't have the right to change them.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Feeds')
@@ -190,7 +190,7 @@
def test_folder_convert(self):
"""Test folder to publication conversion.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
@@ -215,7 +215,7 @@
def test_folder_feeds(self):
"""Test feeds settings. An editor and above can change them
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Feeds')
@@ -262,7 +262,7 @@
def test_folder_convert(self):
"""Test folder to publication conversion.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
@@ -298,7 +298,7 @@
Editors don't have access to the access tab.
"""
self.assertEqual(self.access, False)
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
@@ -320,7 +320,7 @@
Editors don't have access to the addable tab.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
@@ -340,7 +340,7 @@
def test_folder_customization(self):
"""Test folder customization.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
@@ -376,7 +376,7 @@
Editors don't have access to the addable tab.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
@@ -431,7 +431,7 @@
Editors don't have access to the access tab.
"""
self.assertEqual(self.access, True)
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Data')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_folder_toolbar.py
--- a/src/silva/core/smi/tests/test_func_folder_toolbar.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_folder_toolbar.py Tue Oct 08 15:06:04 2013 +0200
@@ -5,7 +5,7 @@
import unittest
from Products.Silva.ftesting import smi_settings
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
class AuthorFolderTestCase(unittest.TestCase):
@@ -18,7 +18,7 @@
self.layer.login('editor')
def test_content_cut(self):
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Folder')
factory.manage_addMockupVersionedContent('document', 'Document')
@@ -70,7 +70,7 @@
'author': self.user}])
def test_content_copy(self):
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addMockupVersionedContent('document', 'Document')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_ghost.py
--- a/src/silva/core/smi/tests/test_func_ghost.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_ghost.py Tue Oct 08 15:06:04 2013 +0200
@@ -4,7 +4,7 @@
import unittest
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
from silva.core.references.reference import get_content_id
@@ -17,7 +17,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addMockupVersionedContent('document', 'Document')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_ghost_folder.py
--- a/src/silva/core/smi/tests/test_func_ghost_folder.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_ghost_folder.py Tue Oct 08 15:06:04 2013 +0200
@@ -4,7 +4,7 @@
import unittest
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
from silva.core.references.reference import get_content_id
@@ -29,7 +29,7 @@
"""
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Folder')
folder = self.root._getOb('folder')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_indexer.py
--- a/src/silva/core/smi/tests/test_func_indexer.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_indexer.py Tue Oct 08 15:06:04 2013 +0200
@@ -7,7 +7,7 @@
from silva.core.interfaces import IIndexer
from zope.interface.verify import verifyObject
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
@@ -17,7 +17,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addIndexer('indexer', 'Indexer')
@@ -65,7 +65,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addIndexer('indexer', 'Indexer')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_link.py
--- a/src/silva/core/smi/tests/test_func_link.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_link.py Tue Oct 08 15:06:04 2013 +0200
@@ -8,7 +8,7 @@
from silva.core.interfaces import ILink
from zope.interface.verify import verifyObject
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
@@ -22,7 +22,7 @@
self.layer.login('editor')
def test_link_add_internal_and_listing(self):
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addMockupVersionedContent('document', 'Document')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_publication.py
--- a/src/silva/core/smi/tests/test_func_publication.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_publication.py Tue Oct 08 15:06:04 2013 +0200
@@ -5,7 +5,7 @@
import unittest
from silva.core.interfaces import ISiteManager
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from Products.Silva.ftesting import smi_settings
@@ -15,7 +15,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addPublication('site', 'Site')
@@ -59,7 +59,7 @@
def test_publication_add_and_listing(self):
"""Create a Publication check its tabs and actions and delete it.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addPublication('site', 'Site')
@@ -146,7 +146,7 @@
def test_publication_convert(self):
"""Test folder to publication conversion.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addPublication('publication', 'Data')
@@ -258,7 +258,7 @@
def test_publication_convert(self):
"""Test folder to publication conversion.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addPublication('publication', 'Data')
@@ -289,7 +289,7 @@
def test_publication_localsite(self):
"""Test activating a local site on a publication.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addPublication('publication', 'Data')
@@ -340,7 +340,7 @@
"""You cannot unactivate a local site if there are services
registered in it.
"""
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addPublication('publication', 'Data')
ISiteManager(self.root.publication).make_site()
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_publish.py
--- a/src/silva/core/smi/tests/test_func_publish.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_publish.py Tue Oct 08 15:06:04 2013 +0200
@@ -5,7 +5,7 @@
import unittest
from Products.Silva.ftesting import smi_settings
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from silva.core.interfaces import IPublicationWorkflow
@@ -15,7 +15,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addMockupVersionedContent('document', 'Document')
@@ -257,7 +257,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addMockupVersionedContent('document', 'Document')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_func_publish_toolbar.py
--- a/src/silva/core/smi/tests/test_func_publish_toolbar.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_func_publish_toolbar.py Tue Oct 08 15:06:04 2013 +0200
@@ -5,7 +5,7 @@
import unittest
from Products.Silva.ftesting import smi_settings
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
class ToolbarPublicationTestCase(unittest.TestCase):
@@ -14,7 +14,7 @@
def setUp(self):
self.root = self.layer.get_application()
self.layer.login('editor')
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addMockupVersionedContent('document', 'Document')
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_rest_folder.py
--- a/src/silva/core/smi/tests/test_rest_folder.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_rest_folder.py Tue Oct 08 15:06:04 2013 +0200
@@ -5,7 +5,7 @@
import unittest
from Products.Silva.ftesting import rest_settings
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from silva.core.cache.memcacheutils import Reset
from zope.component import getUtility
from zope.intid.interfaces import IIntIds
@@ -25,7 +25,7 @@
self.layer.login(self.user)
self.get_id = getUtility(IIntIds).getId
with Reset():
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFolder('folder', 'Folder')
factory = self.root.folder.manage_addProduct['Silva']
diff -r 0562236468ad -r 21a4d3bd5ee1 src/silva/core/smi/tests/test_rest_references.py
--- a/src/silva/core/smi/tests/test_rest_references.py Thu Aug 01 11:04:59 2013 +0200
+++ b/src/silva/core/smi/tests/test_rest_references.py Tue Oct 08 15:06:04 2013 +0200
@@ -5,7 +5,7 @@
import unittest
from zope.component import getUtility
from Products.Silva.ftesting import rest_settings
-from Products.Silva.testing import FunctionalLayer, CatalogTransaction
+from Products.Silva.testing import FunctionalLayer, Transaction
from silva.core.references.interfaces import IReferenceService
from silva.core.references.reference import BrokenReferenceError
from silva.core.references.reference import get_content_id
@@ -17,7 +17,7 @@
def setUp(self):
self.root = self.layer.get_application()
- with CatalogTransaction():
+ with Transaction():
factory = self.root.manage_addProduct['Silva']
factory.manage_addFile('file', 'File')
factory.manage_addLink('data', 'Link to File', target=self.root.file)