aeef968c4e
* Tests/Integration/webdavlib.py(HTTPPOST,HTTPGET): Allow cookies in post and get requests. * Tests/Integration/test-ui-posts.py: New test class Currently contains only one test case which exercises addWebCalendar * SoObjects/Appointments/GNUmakefile: use -Wl,--no-as-needed when linking. Fixes #1863 Monotone-Parent: 080d411d52272c158ce60ea0bab6ba8eb9d9aa2a Monotone-Revision: 8ce46d6fa7b1d1a9d12069cee3ba796d99d668d2 Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-07-18T20:22:54 |
||
---|---|---|
.. | ||
all.py | ||
config.py.in | ||
ev_generator.py | ||
GNUmakefile | ||
GNUmakefile.preamble | ||
managesieve.py | ||
preferences.py | ||
propfind.py | ||
README | ||
sogoLogin.py | ||
sogotests.py | ||
test-caldav-scheduling.py | ||
test-config.py | ||
test-contact-categories.py | ||
test-davacl.py | ||
test-default-classification.py | ||
test-ical.py | ||
test-maildav.py | ||
test-preferences.py | ||
test-sieve.py | ||
test-sogo-tool.py | ||
test-ui-posts.py | ||
test-webdav.py | ||
test-webdavlib.py | ||
test-webdavsync.py | ||
teststrings.m | ||
teststrings.sh | ||
utilities.py | ||
webdavlib.py |
setup ----- (you need "python-simplejson", "python-xml", "python-vobject", "python-dateutil" and "python-m2crypto" in order to run the scripts on Debian) 1) copy config.py.in to config.py (make sure to never EVER add it to monotone) 2) edit config.py to suit your environment 3) make sure that you use a fresh database, with no prior information in it 4) make sure that SOGoCalendarDefaultRoles and SOGoContactsDefaultRoles are empty or undefined 5) run the test scripts runnable scripts ---------------- all.py - run all scripts below at once test-webdavsync.py - explicit test-davacl.py - dav acl tests for calendar and addressbook modules other scripts ------------- propfind.py - a sample implementation of a PROPFIND request using webdavlib * developers ------------ - Test methods are always prefixed with "test". Sometimes, it's easier to track down a problem by enabling only one test at a time. One possible method is to replace "def test" with "def xtest" and replace it back when the problems are solved. - Test failures start with "FAIL:". Those are the ones that indicate possible bugs in the application, if the test is itself known to work. For example like this: ====================================================================== FAIL: 'modify' PUBLIC, 'view all' PRIVATE, 'view d&t' confidential ---------------------------------------------------------------------- Traceback (most recent call last): File "./davacl.py", line 75, in testModifyPublicViewAllPrivateViewDConfidential self._testRights({ "pu": "m", "pr": "v", "co": "d" }) File "./davacl.py", line 119, in _testRights self._testCreate(rights) File "./davacl.py", line 165, in _testCreate exp_code) File "./davacl.py", line 107, in _putEvent % (exp_status, put.response["status"])) AssertionError: event creation/modification: expected status code '403' (received '201') - Test errors start with "ERRORS" and most likely indicate a bug in the test code itself. - Always set a doc string on the test methods, especially for complex test cases. - When writing tests, be aware that contrarily to unit tests, functional tests often imply a logical order between the different steps.