test: ensure timestamp in test data are properly typed
according to model declaration, a timestamp must be a dict with 2 keys,
'seconds' and 'microseconds'.
Also add a few more tests for the date_to_db helper function so that the
test coverage of this later remains.