Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ATContentTypes.tests.test_installation.TestInstallation Class Reference
Inheritance diagram for ATContentTypes.tests.test_installation.TestInstallation:
Inheritance graph
[legend]
Collaboration diagram for ATContentTypes.tests.test_installation.TestInstallation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def test_tool_installed
def test_skin_installed
def test_installedAllTypes
def test_not_quickinstalled
def test_release_settings_SAVE_TO_FAIL_FOR_DEVELOPMENT
def test_reindex_doesnt_add_tools
def test_adds_related_items_catalog_index
def test_api_import

Public Attributes

 tool
 ttool
 cat

Detailed Description

Definition at line 37 of file test_installation.py.


Member Function Documentation

Definition at line 39 of file test_installation.py.

00039 
00040     def afterSetUp(self):
00041         self.tool = getattr(self.portal.aq_explicit, TOOLNAME)
00042         self.ttool = getattr(self.portal.aq_explicit, 'portal_types')
00043         self.cat = getattr(self.portal.aq_explicit, 'portal_catalog')

Definition at line 88 of file test_installation.py.

00088 
00089     def test_adds_related_items_catalog_index(self):
00090         self.assertEqual(self.cat.Indexes['getRawRelatedItems'].__class__.__name__,
00091                          'KeywordIndex')

Definition at line 92 of file test_installation.py.

00092 
00093     def test_api_import(self):
00094         import Products.ATContentTypes.atct
00095 
00096 
00097 tests.append(TestInstallation)

Definition at line 56 of file test_installation.py.

00056 
00057     def test_installedAllTypes(self):
00058         # test that all types are installed well
00059         ttool = self.ttool
00060         ids = ('Document', 'Favorite', 'File',
00061             'Folder', 'Image', 'Large Plone Folder', 'Link',
00062             'News Item', 'Topic', 'Event')
00063 
00064         tids = ttool.objectIds()
00065         for id in ids:
00066             self.failUnless(id in tids, (id, tids))
00067             tinfo = ttool[id]
00068             self.failUnless(tinfo.product == 'ATContentTypes', tinfo.product)

Definition at line 69 of file test_installation.py.

00069 
00070     def test_not_quickinstalled(self):
00071         qi = getattr(self.portal, 'portal_quickinstaller')
00072         products = [prod['id'] for prod in qi.listInstalledProducts()]
00073         self.failIf('ATContentTypes' in products)

Here is the call graph for this function:

Definition at line 77 of file test_installation.py.

00077 
00078     def test_reindex_doesnt_add_tools(self):
00079         cat = self.cat
00080         ids = [id for id in self.portal.objectIds()
00081                if id.startswith('portal_') ]
00082         # a rought guess
00083         self.failIf(len(ids) < 5)
00084         for id in ids:
00085                 result = cat(id=id)
00086                 l = len(result)
00087                 self.failUnlessEqual(l, 0, (id, l, result))

Definition at line 74 of file test_installation.py.

00074 
00075     def test_release_settings_SAVE_TO_FAIL_FOR_DEVELOPMENT(self):
00076         self.failUnlessEqual(SWALLOW_IMAGE_RESIZE_EXCEPTIONS, True)

Definition at line 51 of file test_installation.py.

00051 
00052     def test_skin_installed(self):
00053         stool = getattr(self.portal.aq_explicit, 'portal_skins')
00054         ids = stool.objectIds()
00055         self.failUnless('ATContentTypes' in ids, ids)

Definition at line 44 of file test_installation.py.

00044 
00045     def test_tool_installed(self):
00046         t = getToolByName(self.portal, TOOLNAME, None)
00047         self.failUnless(t, t)
00048         self.failUnless(isinstance(t, ATCTTool), t.__class__)
00049         self.failUnlessEqual(t.meta_type, 'ATCT Tool')
00050         self.failUnlessEqual(t.getId(), TOOLNAME)

Here is the call graph for this function:


Member Data Documentation

Definition at line 42 of file test_installation.py.

Definition at line 40 of file test_installation.py.

Definition at line 41 of file test_installation.py.


The documentation for this class was generated from the following file: