Mock datetime instead of redefining standard library
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.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- swift-storage/ +/902594 /opendev. org/openstack/ charm-swift- storage/ commit/ 72e22a94ed4966f f6fb2fba41bac1b 204dbd4c14
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 72e22a94ed4966f f6fb2fba41bac1b 204dbd4c14
Author: Corey Bryant <email address hidden>
Date: Mon Dec 4 15:47:20 2023 -0500
Mock datetime instead of redefining standard library
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 61e4a8dbcba0a8a 01108cd9b2e
Change-Id: I9c585c91c5527a