charm-swift-storage/unit_tests
Corey Bryant 897e34f1df 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.

Additionally, to fix the py310 unit tests, jsonschema is pinned to
the latest version that doesn't depend (indirectly) on Rust. This
is not part of the original cherry-pick but is needed in this change
in order to fix py310 unit tests. This is not needed for stable/2023.1
and above, where commit da0f33c95b (Fix
charm for tox4 compatibility) fixed this issue. Stable branches
prior to stable/2023.1 pinned tox to < 4.0.0.

Closes-Bug: #2045588
Change-Id: I9c585c91c5527a61e4a8dbcba0a8a01108cd9b2e
(cherry picked from commit 72e22a94ed)
2023-12-07 14:59:35 -05:00
..
__init__.py Sync libraries & common files prior to freeze 2020-09-27 19:20:00 +01:00
test_actions.py Use unittest.mock instead of mock 2020-06-09 00:02:15 +02:00
test_actions_openstack_upgrade.py Use unittest.mock instead of mock 2020-06-09 00:02:15 +02:00
test_check_swift_storage.py Mock datetime instead of redefining standard library 2023-12-07 14:59:35 -05:00
test_misc_utils.py Use unittest.mock instead of mock 2020-06-09 00:02:15 +02:00
test_swift_storage_context.py Fix swift replication errors 2021-01-05 11:19:13 -03:00
test_swift_storage_relations.py Sync libraries & common files prior to freeze 2020-09-27 19:20:00 +01:00
test_swift_storage_utils.py Fix swift replication errors 2021-01-05 11:19:13 -03:00
test_templates.py Use unittest.mock instead of mock 2020-06-09 00:02:15 +02:00
test_utils.py Use unittest.mock instead of mock 2020-06-09 00:02:15 +02:00