[CalendarServer-changes] [6261] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 8 18:17:09 PDT 2010
Revision: 6261
http://trac.macosforge.org/projects/calendarserver/changeset/6261
Author: cdaboo at apple.com
Date: 2010-09-08 18:17:08 -0700 (Wed, 08 Sep 2010)
Log Message:
-----------
Test fixes.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/stdconfig.py
CalendarServer/trunk/twistedcaldav/test/test_config.py
Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py 2010-09-08 22:45:38 UTC (rev 6260)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py 2010-09-09 01:17:08 UTC (rev 6261)
@@ -675,7 +675,7 @@
inDict = inDict[segment]
lastPath = relativePath[-1]
relativePath = ".".join(relativePath)
- if lastPath in inDict:
+ if inDict and lastPath in inDict:
previousAbsoluteName = ".absolute." + relativePath
previousRelativeName = ".relative." + relativePath
Modified: CalendarServer/trunk/twistedcaldav/test/test_config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_config.py 2010-09-08 22:45:38 UTC (rev 6260)
+++ CalendarServer/trunk/twistedcaldav/test/test_config.py 2010-09-09 01:17:08 UTC (rev 6261)
@@ -66,9 +66,16 @@
if key in ("ServerHostName",):
# Value is calculated and may vary
continue
- if key in (item[1] for item in RELATIVE_PATHS):
- # These are covered by test_stdconfig.
- continue
+ for item in RELATIVE_PATHS:
+ item = item[1]
+ if isinstance(item, str):
+ item = (item,)
+ if key == item[0]:
+ if len(item) == 1:
+ value = getattr(config, key)
+ else:
+ value[item[1]] = getattr(config, key)[item[1]]
+
self.assertEquals(
getattr(config, key), value,
"config[%r] == %r, expected %r"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100908/8370ee3b/attachment.html>
More information about the calendarserver-changes
mailing list