[Checkins] SVN: Products.PluggableAuthService/trunk/Products/PluggableAuthService/ merged r102059 from the 1.6 branch -- test setup fixes
David Glick
davidglick at onenw.org
Wed Jul 22 03:25:03 EDT 2009
Log message for revision 102060:
merged r102059 from the 1.6 branch -- test setup fixes
Changed:
U Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt
U Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_exportimport.py
-=-
Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt
===================================================================
--- Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt 2009-07-22 07:22:49 UTC (rev 102059)
+++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt 2009-07-22 07:25:03 UTC (rev 102060)
@@ -4,6 +4,9 @@
PluggableAuthService 1.7 (unreleased)
-------------------------------------
+- Fixed test setup for tests using page templates relying on the
+ DefaultTraversable adapter.
+
- Fixed broken markup.
- Don't fail on users defined in multiple user sources on the ZODBGroupManager
Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_exportimport.py
===================================================================
--- Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_exportimport.py 2009-07-22 07:22:49 UTC (rev 102059)
+++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_exportimport.py 2009-07-22 07:25:03 UTC (rev 102060)
@@ -37,6 +37,8 @@
from Products.GenericSetup.tests.common import BaseRegistryTests
from Products.GenericSetup.tests.common import DummyExportContext
from Products.GenericSetup.tests.common import DummyImportContext
+
+ from Products.PluggableAuthService.tests.utils import _setUpDefaultTraversable
class _TestBase(BaseRegistryTests,
ConformsToIFilesystemExporter,
@@ -74,6 +76,8 @@
self.assertEqual(len(info['users']), 0)
def test_export_empty(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('empty').__of__(self.root)
adapter = self._makeOne(plugin)
@@ -111,7 +115,8 @@
self.assertEqual(x['password_hash'], y['password_hash'])
def test_export_with_users(self):
-
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('with_users').__of__(self.root)
plugin.title = 'Plugin Title'
@@ -215,6 +220,8 @@
self.assertEqual(len(info['groups']), 0)
def test_export_empty(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('empty').__of__(self.root)
adapter = self._makeOne(plugin)
@@ -247,7 +254,8 @@
self.assertEqual(x, y)
def test_export_with_groups(self):
-
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('with_groups').__of__(self.root)
plugin.title = 'Plugin Title'
@@ -357,6 +365,8 @@
self.assertEqual(len(info['roles']), 0)
def test_export_empty(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('empty').__of__(self.root)
adapter = self._makeOne(plugin)
@@ -389,7 +399,8 @@
self.assertEqual(x, y)
def test_export_with_roles(self):
-
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('with_roles').__of__(self.root)
plugin.title = 'Plugin Title'
@@ -503,6 +514,8 @@
self.assertEqual(info['login_path'], CookieAuthHelper.login_path)
def test_export_default(self):
+ _setUpDefaultTraversable()
+
from Products.PluggableAuthService.plugins.CookieAuthHelper \
import CookieAuthHelper as CAH
plugin = self._makePlugin('default').__of__(self.root)
@@ -536,6 +549,8 @@
self.assertEqual(info['login_path'], LOGIN_PATH)
def test_export_explicitly_set(self):
+ _setUpDefaultTraversable()
+
TITLE = 'Plugin Title'
COOKIE_NAME = 'COOKIE_NAME'
LOGIN_PATH = 'LOGIN_PATH'
@@ -633,6 +648,8 @@
self.assertEqual(len(info['map']), 0)
def test_export_empty(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('empty', None).__of__(self.root)
adapter = self._makeOne(plugin)
@@ -673,6 +690,8 @@
self.assertEqual(match['roles'], ','.join(ROLES))
def test_export_with_map(self):
+ _setUpDefaultTraversable()
+
TITLE = 'With Map'
USER_ID = 'some_user_id'
DOMAIN = 'host.example.com'
@@ -833,6 +852,8 @@
self.assertEqual(info['title'], 'Plugin Title')
def test_export_no_title(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('no_title', None).__of__(self.root)
adapter = self._makeOne(plugin)
@@ -846,6 +867,8 @@
self.assertEqual( content_type, 'text/xml' )
def test_export_with_title(self):
+ _setUpDefaultTraversable()
+
TITLE = 'Plugin Title'
plugin = self._makePlugin('with_title', None).__of__(self.root)
plugin.title = TITLE
@@ -924,6 +947,8 @@
self.assertEqual(info['delegate'], '')
def test_export_default(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('default').__of__(self.root)
adapter = self._makeOne(plugin)
@@ -949,6 +974,8 @@
self.assertEqual(info['delegate'], DELEGATE_PATH)
def test_export_explicitly_set(self):
+ _setUpDefaultTraversable()
+
TITLE = 'Plugin Title'
DELEGATE_PATH = 'path/to/delegate'
plugin = self._makePlugin('explicit').__of__(self.root)
@@ -1030,6 +1057,8 @@
self.assertEqual(len(info['groups']), 0)
def test_export_empty(self):
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('empty', None).__of__(self.root)
adapter = self._makeOne(plugin)
@@ -1065,7 +1094,8 @@
self.assertEqual(x, y)
def test_export_with_groups(self):
-
+ _setUpDefaultTraversable()
+
plugin = self._makePlugin('with_groups').__of__(self.root)
plugin.title = 'Plugin Title'
More information about the Checkins
mailing list