Tox 4.0.0 was recently released and it has several breaking changes.
We pin to < 4.0.0 here. We are planning to move forward only on the
master charm branches.
Tox is also pinned to < 4.0.0 for stable branches in upstream
openstack-zuul-jobs as well as in zosci-config. However, the
requires= section in the charm's tox.ini file ends up installing
tox>4, wiping out the zuul-pinned tox<4 that was already installed
installed. This patch fixes that.
Additional changes included in this patch:
- Cherry-pick commit 9a5bf82fae
Use unittest.mock instead of mock
Related-Bug: #2002788
Change-Id: Iac2499cfc946b2b218cc9d07d1a55e11a4056932