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