diff --git a/Tests/Integration/preferences.py b/Tests/Integration/preferences.py index 28c971a39..0d330e4ad 100644 --- a/Tests/Integration/preferences.py +++ b/Tests/Integration/preferences.py @@ -6,10 +6,15 @@ import simplejson import sogoLogin -SOGoSupportedLanguages = [ "Catalan", "Czech", "Welsh", "English", "SpanishSpain", "SpanishArgentina", - "French", "German", "Icelandic", "Italian", "Hungarian", "Danish", - "Dutch", "BrazilianPortuguese", "NorwegianBokmal", - "NorwegianNynorsk", "Polish", "Russian", "Ukrainian", "Swedish" ] + + +# must be kept in sync with SoObjects/SOGo/SOGoDefaults.plist +# this should probably be fetched magically... +SOGoSupportedLanguages = [ "Catalan", "Czech", "Dutch", "Danish", "Welsh", "English", + "SpanishSpain", "SpanishArgentina", "French", "German", + "Icelandic", "Italian", "Hungarian", "BrazilianPortuguese", + "NorwegianBokmal", "NorwegianNynorsk", "Polish", "Russian", + "Ukrainian", "Swedish" ]; daysBetweenResponseList=[1,2,3,5,7,14,21,30] class HTTPPreferencesPOST (webdavlib.HTTPPOST): @@ -44,22 +49,24 @@ class preferences: authCookie = sogoLogin.getAuthCookie(hostname, port, username, password) self.cookie = authCookie + # map between preferences/jsonDefaults and the webUI names + # should probably be unified... self.preferencesMap = { - "SOGoLanguage": "2.1.0.3.0.1.4.3.1.3.1.1.2", - "SOGoSieveFilters": "sieveFilters", + "SOGoLanguage": "language", + "SOGoSieveFilters": "sieveFilters", # Vacation stuff "Vacation": "enableVacation", # to disable, don't specify it "autoReplyText": "autoReplyText", # string "autoReplyEmailAddresses": "autoReplyEmailAddresses", # LIST - "daysBetweenResponse": "2.1.0.3.0.1.4.3.1.3.7.1.5.1.1.3.7.2", # see daysBetweenResponseList + "daysBetweenResponse": "daysBetweenResponsesList", "ignoreLists": "ignoreLists", #bool # forward stuff - "Forward": "enableForward", # to disable, don't specify it - "forwardAddress": "forwardAddress", - "keepCopy": "forwardKeepCopy", - } + "Forward": "enableForward", # to disable, don't specify it + "forwardAddress": "forwardAddress", + "keepCopy": "forwardKeepCopy", + } def set(self, preference, value=None): # if preference is a dict, set all prefs found in the dict @@ -102,5 +109,6 @@ class preferences: # Simple main to test this class if __name__ == "__main__": p = preferences () + print p.get ("SOGoLanguage") p.set ("SOGoLanguage", SOGoSupportedLanguages.index("French")) print p.get ("SOGoLanguage") diff --git a/Tests/Integration/test-sieve.py b/Tests/Integration/test-sieve.py index f1007c454..54620a339 100644 --- a/Tests/Integration/test-sieve.py +++ b/Tests/Integration/test-sieve.py @@ -87,7 +87,7 @@ class sieveTest(unittest.TestCase): def testSieveVacationIgnoreLists(self): """ enable vacation script - ignore lists""" vacation_msg="vacation test - ignore list" - daysSelect=4 + daysSelect=2 sieveScript = sieve_vacation_ignoreLists % { "mailaddr": self.user_email, "vacation_msg": vacation_msg,