"""Reload all relevant objects."""
universe.save()
old_userlist = universe.userlist[:]
+ old_loglines = universe.loglines[:]
for element in list(universe.contents.values()):
element.destroy()
universe.load()
+ new_loglines = universe.loglines[:]
+ universe.loglines = old_loglines + new_loglines
for user in old_userlist:
user.reload()
test_show_log = (
(2, "> ", "show log"),
(2, r"There are [0-9]+ log lines in memory and [0-9]+ at or above level "
- r"[0-9]+\. The matching lines\r\nfrom [0-9]+ to [0-9]+ are:", ""),
+ r"[0-9]+\. The matching.*from [0-9]+ to [0-9]+ are:", ""),
)
test_custom_loglevel = (
(2, "> ", "set account.admin loglevel 2"),
(2, "You have successfully .*> ", "show log"),
(2, r"There are [0-9]+ log lines in memory and [0-9]+ at or above level "
- r"[0-9]+\. The matching lines\r\nfrom [0-9]+ to [0-9]+ are:", ""),
+ r"[0-9]+\. The matching.*from [0-9]+ to [0-9]+ are:", ""),
)
test_invalid_loglevel = (