diff --git a/test/units/module_utils/test_postgresql.py b/test/units/module_utils/test_postgresql.py index cf82cbc9011..5c1df52c7bd 100644 --- a/test/units/module_utils/test_postgresql.py +++ b/test/units/module_utils/test_postgresql.py @@ -21,6 +21,12 @@ class TestPostgres(unittest.TestCase): if mod in sys.modules: del sys.modules[mod] + def test_import(self): + # this import makes dependency analysis work so the tests will run when the module_utils change + from ansible.module_utils.postgres import HAS_PSYCOPG2 + + assert HAS_PSYCOPG2 is not None + @patch.object(builtins, '__import__') def test_postgres_pg2_missing_ensure_libs(self, mock_import): def _mock_import(name, *args, **kwargs):