[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py Move schema-mandated attrs to context (where normally found.)
Tres Seaver
cvs-admin at zope.org
Wed May 9 20:22:57 UTC 2012
Log message for revision 125770:
Move schema-mandated attrs to context (where normally found.)
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py 2012-05-09 20:22:49 UTC (rev 125769)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py 2012-05-09 20:22:54 UTC (rev 125770)
@@ -1219,8 +1219,8 @@
def _makeOne(self, context=None, **kw):
if context is None:
context = FauxContext()
+ context.package = None #appease IConfigurationContext
instance = self._getTargetClass()(context, **kw)
- instance.package = None # XXX to appease IConfigurationContext
return instance
def test_ctor_no_kwargs(self):
@@ -1274,10 +1274,10 @@
def _makeOne(self, context=None):
if context is None:
- context = object()
+ context = FauxContext()
+ context.package = None #appease IConfigurationContext
+ context.namespace = None #appease IDirectivesInfo
instance = self._getTargetClass()(context)
- instance.package = None # XXX to appease IConfigurationContext
- instance.namespace = None # XXX to appease IDirectivesContext
return instance
#TODO coverage
@@ -1324,13 +1324,14 @@
def _makeOne(self, context=None):
if context is None:
- context = object()
+ context = FauxContext()
+ context.package = None #appease IConfigurationContext
+ context.namespace = None #appease IDirectivesInfo
+ context.name = None #appease IDirectiveInfo
+ context.schema = None #appease IDirectiveInfo
+ context.handler = None #appease IFullInfo
+ context.usedIn = None #appease IFullInfo
instance = self._getTargetClass()(context)
- instance.package = None # XXX to appease IConfigurationContext
- instance.name = None # XXX to appease IComplexDirectiveContext
- instance.schema = None # XXX to appease IComplexDirectiveContext
- instance.handler = None # XXX to appease IComplexDirectiveContext
- instance.usedIn = None # XXX to appease IComplexDirectiveContext
return instance
#TODO coverage
More information about the checkins
mailing list