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