def METHOD_NAME(self):
    with util.mock_modules('pkg.__init__') as importer:
        with util.import_state(meta_path=[importer]):
            module = self.__import__('pkg', fromlist=['non_existent'])
            self.assertEqual(module.__name__, 'pkg')
            self.assertFalse(hasattr(module, 'non_existent'))