def test_custom_command(self):
        self._user_input('django-admin.py test_command --l')
        output = self._run_autocomplete()
        self.assertEqual(output, ['--list'])
A custom command can autocomplete option flags
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/bash_completion/tests.py/BashCompletionTests.test_custom_command