Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error when running unit test
test_created_pod
with Py3.11 (astr…
…onomer#825) When the CI ran: `hatch run tests.py3.11-2.7:test-cov` It was consistently raising the exception: ``` FAILED tests/operators/test_kubernetes.py::test_created_pod - kubernetes.config.config_exception.ConfigException: Invalid kube-config file. No configuration found. ``` Example: https://github.com/astronomer/astronomer-cosmos/actions/runs/7726274202/job/21063656952 I could not reproduce this issue locally, even when using Python 3.11.8. An explanation I see is that the built-in `unittest.mock` library changed in the Python version the CI was using - and for some reason, the way the mock was set stopped working. I changed how the mock was defined, and things seem to work fine.
- Loading branch information