Skip to content

Commit

Permalink
Fixed #7728 -- Modified the output check in the admin script tests. C…
Browse files Browse the repository at this point in the history
…hecking for pyc is a CPython-specific check, and it breaks CPython if pyc files aren't generated (due to permission problems, etc). Thanks to Maciej Fijalkowski (fijal) for the report and fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Jul 13, 2008
1 parent 32b8c3e commit be6ca58
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/regressiontests/admin_scripts/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,9 @@ def test_app_command(self):
out, err = self.run_manage(args)
self.assertNoOutput(err)
self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'")
self.assertOutput(out, os.sep.join(['django','contrib','auth','models.pyc']) + "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")

self.assertOutput(out, os.sep.join(['django','contrib','auth','models.py']))
self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")

def test_app_command_no_apps(self):
"User AppCommands raise an error when no app name is provided"
args = ['app_command']
Expand All @@ -817,7 +818,8 @@ def test_app_command_multiple_apps(self):
self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'")
self.assertOutput(out, os.sep.join(['django','contrib','auth','models.pyc']) + "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.contenttypes.models'")
self.assertOutput(out, os.sep.join(['django','contrib','contenttypes','models.pyc']) + "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
self.assertOutput(out, os.sep.join(['django','contrib','contenttypes','models.py']))
self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")

def test_app_command_invalid_appname(self):
"User AppCommands can execute when a single app name is provided"
Expand Down

0 comments on commit be6ca58

Please sign in to comment.