use timedelta.total_seconds

instead of custom implementation _timedelda_to_seconds
test and fix behaviour change in queue_log
factorize duplicate test code
factorize duplicate test code