[CalendarServer-changes] [5346] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 17 16:48:06 PDT 2010
Revision: 5346
http://trac.macosforge.org/projects/calendarserver/changeset/5346
Author: wsanchez at apple.com
Date: 2010-03-17 16:48:04 -0700 (Wed, 17 Mar 2010)
Log Message:
-----------
Calling config.update() is not not necessary.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/provision/test/test_root.py
CalendarServer/trunk/calendarserver/tap/test/test_caldav.py
CalendarServer/trunk/twistedcaldav/test/test_config.py
CalendarServer/trunk/twistedcaldav/test/util.py
Modified: CalendarServer/trunk/calendarserver/provision/test/test_root.py
===================================================================
--- CalendarServer/trunk/calendarserver/provision/test/test_root.py 2010-03-17 23:38:53 UTC (rev 5345)
+++ CalendarServer/trunk/calendarserver/provision/test/test_root.py 2010-03-17 23:48:04 UTC (rev 5346)
@@ -56,12 +56,6 @@
def setUp(self):
super(RootTests, self).setUp()
- # XXX make sure that the config hooks have been run, so that we get the
- # default RootResourceACL key is set and traversal works. This is not
- # great, and the ACLs supported by the root resource should really be
- # an _attribute_ on the root resource. -glyph
- config.update({})
-
self.docroot = self.mktemp()
os.mkdir(self.docroot)
Modified: CalendarServer/trunk/calendarserver/tap/test/test_caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/test/test_caldav.py 2010-03-17 23:38:53 UTC (rev 5345)
+++ CalendarServer/trunk/calendarserver/tap/test/test_caldav.py 2010-03-17 23:48:04 UTC (rev 5346)
@@ -233,7 +233,8 @@
self.config.SudoersFile = ""
- self.config.update(self.configOptions if self.configOptions else {})
+ if self.configOptions:
+ self.config.update(self.configOptions)
os.mkdir(self.config.ServerRoot)
os.mkdir(os.path.join(self.config.ServerRoot, self.config.DocumentRoot))
Modified: CalendarServer/trunk/twistedcaldav/test/test_config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_config.py 2010-03-17 23:38:53 UTC (rev 5345)
+++ CalendarServer/trunk/twistedcaldav/test/test_config.py 2010-03-17 23:48:04 UTC (rev 5346)
@@ -59,12 +59,19 @@
def tearDown(self):
config.setDefaults(DEFAULT_CONFIG)
config.reset()
- config.update()
def testDefaults(self):
for key, value in DEFAULT_CONFIG.iteritems():
- self.assertEquals(getattr(config, key), value)
+ if key in ("ServerHostName",):
+ # Value is calculated and may vary
+ continue
+ self.assertEquals(
+ getattr(config, key), value,
+ "config[%r] == %r, expected %r"
+ % (key, getattr(config, key), value)
+ )
+
def testLoadConfig(self):
self.assertEquals(config.ResponseCompression, True)
@@ -113,7 +120,6 @@
self.assertNotIn("BindAddresses", config.__dict__)
config.BindAddresses = ["127.0.0.1"]
- config.update()
self.assertNotIn("BindAddresses", config.__dict__)
@@ -221,11 +227,9 @@
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 23:38:53 UTC (rev 5345)
+++ CalendarServer/trunk/twistedcaldav/test/util.py 2010-03-17 23:48:04 UTC (rev 5346)
@@ -62,7 +62,6 @@
os.mkdir(serverroot)
config.ServerRoot = serverroot
config.ConfigRoot = "config"
- config.update()
if not os.path.exists(config.DataRoot):
os.makedirs(config.DataRoot)
@@ -75,7 +74,6 @@
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/f77415d1/attachment.html>
More information about the calendarserver-changes
mailing list