[CalendarServer-changes] [5337] CalendarServer/trunk/twistedcaldav/test
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 17 11:19:19 PDT 2010
Revision: 5337
http://trac.macosforge.org/projects/calendarserver/changeset/5337
Author: wsanchez at apple.com
Date: 2010-03-17 11:19:18 -0700 (Wed, 17 Mar 2010)
Log Message:
-----------
Call config.update() after modifying the config.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/test/test_config.py
CalendarServer/trunk/twistedcaldav/test/util.py
Modified: CalendarServer/trunk/twistedcaldav/test/test_config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_config.py 2010-03-17 18:18:53 UTC (rev 5336)
+++ CalendarServer/trunk/twistedcaldav/test/test_config.py 2010-03-17 18:19:18 UTC (rev 5337)
@@ -59,7 +59,7 @@
def tearDown(self):
config.setDefaults(DEFAULT_CONFIG)
config.reset()
- config.update(None) # Make sure the update hooks get called
+ config.update()
def testDefaults(self):
for key, value in DEFAULT_CONFIG.iteritems():
@@ -113,6 +113,7 @@
self.assertNotIn("BindAddresses", config.__dict__)
config.BindAddresses = ["127.0.0.1"]
+ config.update()
self.assertNotIn("BindAddresses", config.__dict__)
@@ -220,9 +221,11 @@
resource = CalDAVFile("/")
config.EnableProxyPrincipals = True
+ config.update()
self.assertTrue("calendar-proxy" in resource.davComplianceClasses())
config.EnableProxyPrincipals = False
+ config.update()
self.assertTrue("calendar-proxy" not in resource.davComplianceClasses())
def test_logging(self):
Modified: CalendarServer/trunk/twistedcaldav/test/util.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/util.py 2010-03-17 18:18:53 UTC (rev 5336)
+++ CalendarServer/trunk/twistedcaldav/test/util.py 2010-03-17 18:19:18 UTC (rev 5337)
@@ -62,7 +62,7 @@
os.mkdir(serverroot)
config.ServerRoot = serverroot
config.ConfigRoot = "config"
- _updateDataStore(config)
+ config.update()
if not os.path.exists(config.DataRoot):
os.makedirs(config.DataRoot)
@@ -75,6 +75,7 @@
config.Memcached.Pools.Default.ServerEnabled = False
ClientFactory.allowTestCache = True
memcacher.Memcacher.allowTestCache = True
+ config.update()
def createHierarchy(self, structure, root=None):
if root is None:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100317/db1c4c74/attachment-0001.html>
More information about the calendarserver-changes
mailing list