1.1 --- a/tests/list_table.py Sun Jun 05 19:34:36 2016 +0200
1.2 +++ b/tests/list_table.py Sun Jun 05 19:36:32 2016 +0200
1.3 @@ -24,20 +24,23 @@
1.4 import sys
1.5
1.6 def show_list(data):
1.7 - for row in data:
1.8 - print row or ""
1.9 + if data:
1.10 + for row in data:
1.11 + print row or ""
1.12
1.13 def show_object(data):
1.14 if data:
1.15 - print Object(data).to_string()
1.16 + print Object(data).to_string(line_length=1000)
1.17
1.18 def show_periods(data):
1.19 - for row in data:
1.20 - print "\t".join(row.as_tuple(strings_only=True))
1.21 + if data:
1.22 + for row in data:
1.23 + print "\t".join(row.as_tuple(strings_only=True))
1.24
1.25 def show_tuples(data):
1.26 - for row in data:
1.27 - print "\t".join([(column or "") for column in row])
1.28 + if data:
1.29 + for row in data:
1.30 + print "\t".join([(column or "") for column in row])
1.31
1.32 if __name__ == "__main__":
1.33 try:
1.34 @@ -83,6 +86,10 @@
1.35 data = store.get_freebusy_providers(user)
1.36 show_tuples(data)
1.37
1.38 + elif table == "journal_freebusy_providers":
1.39 + data = journal.get_freebusy_providers(user)
1.40 + show_tuples(data)
1.41 +
1.42 # Objects.
1.43
1.44 elif table == "countered_object":
1.45 @@ -96,6 +103,11 @@
1.46 data = store.get_event(user, uid)
1.47 show_object(data)
1.48
1.49 + elif table == "journal_object":
1.50 + uid = args[0]
1.51 + data = journal.get_event(user, uid)
1.52 + show_object(data)
1.53 +
1.54 elif table == "recurrence":
1.55 uid = args[0]
1.56 recurrenceid = args[1]