This fixes up the test to mock the datetime calls specifically in
the test that needs to mock them, rather than the prior approach
which was redefining the behavior of the standard library function
globally.
Closes-Bug: #2045588
Change-Id: I9c585c91c5527a61e4a8dbcba0a8a01108cd9b2e