Improve test for date ordering

Test case may not have guaranteed a data package in the database, which would
cause the expected exception not to be raised. Hopefully this fixes some
intermittent test failures.