1.1 --- a/tests/test_handle.py Wed Mar 09 21:38:56 2016 +0100
1.2 +++ b/tests/test_handle.py Thu Mar 10 01:43:31 2016 +0100
1.3 @@ -24,7 +24,7 @@
1.4 from imiptools.dates import get_datetime, to_timezone
1.5 from imiptools.mail import Messenger
1.6 from imiptools.period import RecurringPeriod
1.7 -import imiptools.stores.file
1.8 +from imiptools.stores import get_store, get_journal
1.9 import sys
1.10
1.11 class TestClient(ClientForObject):
1.12 @@ -94,19 +94,20 @@
1.13
1.14 if __name__ == "__main__":
1.15 try:
1.16 - action, store_dir, journal_dir, preferences_dir, user = sys.argv[1:6]
1.17 + action, store_type, store_dir, journal_dir, preferences_dir, user = sys.argv[1:7]
1.18 if action == "counter":
1.19 - start, end = sys.argv[6:8]
1.20 - i = 8
1.21 + start, end = sys.argv[7:9]
1.22 + i = 9
1.23 else:
1.24 start, end = None, None
1.25 - i = 6
1.26 + i = 7
1.27 uid, recurrenceid = (sys.argv[i:i+2] + [None] * 2)[:2]
1.28 except ValueError:
1.29 print >>sys.stderr, """\
1.30 -Need 'accept', 'counter' or 'decline', a store directory, a preferences
1.31 -directory, user URI, any counter-proposal datetimes (see below), plus the
1.32 -appropriate event UID and RECURRENCE-ID (if a recurrence is involved).
1.33 +Need 'accept', 'counter' or 'decline', a store type, a store directory, a
1.34 +journal directory, a preferences directory, user URI, any counter-proposal
1.35 +datetimes (see below), plus the appropriate event UID and RECURRENCE-ID (if a
1.36 +recurrence is involved).
1.37
1.38 The RECURRENCE-ID must be in exactly the form employed by the store, not a
1.39 different but equivalent representation.
1.40 @@ -120,8 +121,8 @@
1.41 """
1.42 sys.exit(1)
1.43
1.44 - store = imiptools.stores.file.FileStore(store_dir)
1.45 - journal = imiptools.stores.file.FileJournal(journal_dir)
1.46 + store = get_store(store_type, store_dir)
1.47 + journal = get_journal(store_type, journal_dir)
1.48
1.49 if uid is not None:
1.50 fragment = store.get_event(user, uid, recurrenceid)