def test_get_module_name(self):
        """Should get the module name from the name of its spec."""
        target = MagicMock()
        target.__spec__ = MagicMock()
        target.__spec__.name = 'hello'
        self.assertEqual('hello', reloading.get_module_name(target))