1.1 --- a/tests/list_table.py Tue May 23 22:15:05 2017 +0200
1.2 +++ b/tests/list_table.py Wed May 24 15:41:14 2017 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Show the contents of a table.
1.6
1.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -28,9 +28,9 @@
1.13 for row in data:
1.14 print row or ""
1.15
1.16 -def show_object(data):
1.17 - if data:
1.18 - print Object(data).to_string(line_length=1000)
1.19 +def show_object(obj):
1.20 + if obj:
1.21 + print obj.to_string(line_length=1000)
1.22
1.23 def show_periods(data):
1.24 if data:
1.25 @@ -95,24 +95,24 @@
1.26 elif table == "countered_object":
1.27 uid = args[0]
1.28 other = args[1]
1.29 - data = store.get_counter(user, other, uid)
1.30 - show_object(data)
1.31 + obj = store.get_counter(user, other, uid)
1.32 + show_object(obj)
1.33
1.34 elif table == "object":
1.35 uid = args[0]
1.36 - data = store.get_event(user, uid)
1.37 - show_object(data)
1.38 + obj = store.get_event(user, uid)
1.39 + show_object(obj)
1.40
1.41 elif table == "journal_object":
1.42 uid = args[0]
1.43 - data = journal.get_event(user, uid)
1.44 - show_object(data)
1.45 + obj = journal.get_event(user, uid)
1.46 + show_object(obj)
1.47
1.48 elif table == "recurrence":
1.49 uid = args[0]
1.50 recurrenceid = args[1]
1.51 - data = store.get_event(user, uid, recurrenceid)
1.52 - show_object(data)
1.53 + obj = store.get_event(user, uid, recurrenceid)
1.54 + show_object(obj)
1.55
1.56 elif table == "cancelled_recurrences":
1.57 uid = args[0]