mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 17:05:10 +00:00
Monotone-Parent: 9dddcc8446007077ebc41dfa9cec3972bcc03cc5
Monotone-Revision: 329632453c9a3f0fdbb5eb9f65ce204e82fe7549 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-17T15:22:53 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2009-09-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Tests/test-config.py: new functional test to validate the test
|
||||
configuration file.
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m (-userComposeMessagesType):
|
||||
return a default value of @"text" if the default compose type has
|
||||
never been changed by the user. Otherwise, saving the preferences
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from config import hostname, port, username, password, subscriber_username, attendee1, attendee1_delegate
|
||||
|
||||
import unittest
|
||||
|
||||
class CalDAVITIPDelegationTest(unittest.TestCase):
|
||||
def testConfigPY(self):
|
||||
""" config.py validation """
|
||||
try:
|
||||
test = hostname
|
||||
except:
|
||||
self.fail("'hostname' is not defined")
|
||||
|
||||
try:
|
||||
test = username
|
||||
except:
|
||||
self.fail("'username' is not defined")
|
||||
|
||||
try:
|
||||
test = subscriber_username
|
||||
except:
|
||||
self.fail("'subscriber_username' is not defined")
|
||||
|
||||
try:
|
||||
test = attendee1
|
||||
except:
|
||||
self.fail("'attendee1' is not defined")
|
||||
|
||||
try:
|
||||
test = attendee1_delegate
|
||||
except:
|
||||
self.fail("'attendee1_delegate' is not defined")
|
||||
|
||||
self.assertEquals(subscriber_username, attendee1,
|
||||
"'subscriber_username' and 'attendee1'"
|
||||
+ " must be the same user")
|
||||
|
||||
userHash = {}
|
||||
userList = [ username, subscriber_username, attendee1_delegate ]
|
||||
for user in userList:
|
||||
self.assertFalse(userHash.has_key(user),
|
||||
"username, attendee1, attendee1_delegate must"
|
||||
+ " all be different users ('%s')"
|
||||
% user)
|
||||
userHash[user] = True
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user