Fixed MagicMock import in postgres_test