Convert test.py to use the Django 1.4+ execute_from_command_line.

execute_manager deprecated in Django 1.4 and removed in 1.6. Use
the same strategy as manage.py to determine whether to use
execute_manager or execute_from_command_line based upon the Django
version.

https://docs.djangoproject.com/en/1.4/releases/1.4/#django-core-management-execute-manager