unit tests are redefining datetime.datetime.now and should just use mock instead

Bug #2045587 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Swift Storage Charm
New
Undecided
Unassigned

Bug Description

As seen in the failures here:
https://review.opendev.org/c/openstack/charm-swift-storage/+/899610

charm-swift-storage is redefining the standard library's datetime.datetime.now() method:
https://opendev.org/openstack/charm-swift-storage/src/branch/master/unit_tests/test_check_swift_storage.py#L45

and it is causing unintended side-effects.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.