def METHOD_NAME(self):
    with self.mock_modules('pkg.__init__') as mock:
        with util.import_state(meta_path=[mock]):
            del mock['pkg'].__package__
            module = self.__import__('pkg')
            self.assertEqual(module.__package__, 'pkg')