def METHOD_NAME(self):
    with util.mock_spec('pkg.__init__', 'pkg.module') as mock:
        with util.import_state(meta_path=[mock]):
            module = self.__import__('pkg.module')
            self.assertIn('pkg', sys.modules)