Django 1.8 disallows access to args[]
https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/ You need to declare and do proper argument parsing. --commit is also more natural than a bare 'commit' on the end of a command. Switch from calling handle() directly to call_command(). call_command() simulates using the management command so is a better test of the command line interface.
Showing
- cms/djangoapps/contentstore/management/commands/force_publish.py 10 additions, 12 deletions...ngoapps/contentstore/management/commands/force_publish.py
- cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py 9 additions, 9 deletions...tentstore/management/commands/tests/test_force_publish.py
Loading
Please register or sign in to comment