From c8cb1b9e39f49f70065f77c8ea135c21302f9508 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 9 Apr 2010 18:31:17 +0000 Subject: [PATCH] Monotone-Parent: 44fc3e25d97f062f2add05e5d39a9ffb983d11ca Monotone-Revision: 89b96d9d2226f3bc49b522e79b43098dfa922b34 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-09T18:31:17 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 13 +++++++++++++ Tests/Integration/test-caldav-scheduling.py | 6 +++++- Tests/Integration/test-webdav.py | 6 +++++- Tests/Integration/utilities.py | 8 ++++++-- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17b0dd624..a7ef29e25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-04-09 Wolfgang Sourdeau + + * Tests/Integration/utilities.py (TestUtility.fetchUserInfo): same + as below. + + * Tests/Integration/test-webdav.py + (WebDAVTest.testExpandProperty): same as below + + * Tests/Integration/test-caldav-scheduling.py (fetchUserInfo): + accept empty displayname property. + + * Tests/Integration/test-maildav.py: temporarily disabled test + 2010-04-08 Wolfgang Sourdeau * UI/MailerUI/UIxMailEditor.m (-fromEMails, -from): make use of diff --git a/Tests/Integration/test-caldav-scheduling.py b/Tests/Integration/test-caldav-scheduling.py index 2ab0a6d82..99b3573a8 100755 --- a/Tests/Integration/test-caldav-scheduling.py +++ b/Tests/Integration/test-caldav-scheduling.py @@ -30,8 +30,12 @@ def fetchUserInfo(login): None) email_nodes = propfind.xpath_evaluate('/D:multistatus/D:response/D:propstat/D:prop/C:calendar-user-address-set/D:href', None) + if len(name_nodes[0].childNodes) > 0: + displayName = name_nodes[0].childNodes[0].nodeValue + else: + displayName = "" - return (name_nodes[0].childNodes[0].nodeValue, email_nodes[0].childNodes[0].nodeValue) + return (displayName, email_nodes[0].childNodes[0].nodeValue) class CalDAVITIPDelegationTest(unittest.TestCase): def setUp(self): diff --git a/Tests/Integration/test-webdav.py b/Tests/Integration/test-webdav.py index 04d992524..b8e01757b 100755 --- a/Tests/Integration/test-webdav.py +++ b/Tests/Integration/test-webdav.py @@ -143,8 +143,12 @@ class WebDAVTest(unittest.TestCase): propHref.childNodes[0].nodeValue)) propDisplayname = query.xpath_evaluate('D:response/D:propstat/D:prop/D:displayname', propResponse)[0] + if len(propDisplayname.childNodes) > 0: + displayName = propDisplayname.childNodes[0].nodeValue + else: + displayName = "" self.assertEquals(query_props[query_prop]["displayname"], - propDisplayname.childNodes[0].nodeValue, + displayName, "'%s', displayname mismatch: exp. '%s', got '%s'" % (query_prop, query_props[query_prop]["displayname"], diff --git a/Tests/Integration/utilities.py b/Tests/Integration/utilities.py index c90c3cd15..feb08078a 100644 --- a/Tests/Integration/utilities.py +++ b/Tests/Integration/utilities.py @@ -23,8 +23,12 @@ class TestUtility(unittest.TestCase): None) email_nodes = propfind.xpath_evaluate('/D:multistatus/D:response/D:propstat/D:prop/C:calendar-user-address-set/D:href', None) - self.userInfo[login] = (name_nodes[0].childNodes[0].nodeValue, - email_nodes[0].childNodes[0].nodeValue) + + if len(name_nodes[0].childNodes) > 0: + displayName = name_nodes[0].childNodes[0].nodeValue + else: + displayName = "" + self.userInfo[login] = (displayName, email_nodes[0].childNodes[0].nodeValue) return self.userInfo[login]