def test_discover_commands_in_eggs(self):
        """
        Test that management commands can also be loaded from Python eggs.
        """
        egg_dir = '%s/eggs' % os.path.dirname(upath(__file__))
        egg_name = '%s/basic.egg' % egg_dir
        with extend_sys_path(egg_name):
            with self.settings(INSTALLED_APPS=['commandegg']):
                cmds = find_commands(os.path.join(apps.get_app_config('commandegg').path, 'management'))
        self.assertEqual(cmds, ['eggcommand'])
dataset/ETHPy150Open django/django/tests/user_commands/tests.py/CommandTests.test_discover_commands_in_eggs/original