Skip to content

Commit

Permalink
Changed a test to be less specific about the exception string it expe…
Browse files Browse the repository at this point in the history
…cted. Test suite now passes 100% on PyPy.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14536 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
alex committed Nov 11, 2010
1 parent 70edd4e commit 590bde8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/regressiontests/file_storage/tests.py
Expand Up @@ -73,12 +73,14 @@ def test_get_nonexisting_storage_module(self):
"""
get_storage_class raises an error if the requested module don't exist.
"""
self.assertRaisesErrorWithMessage(
# Error message may or may not be the fully qualified path.
self.assertRaisesRegexp(
ImproperlyConfigured,
'Error importing storage module django.core.files.non_existing_'\
'storage: "No module named non_existing_storage"',
('Error importing storage module django.core.files.non_existing_'
'storage: "No module named .*non_existing_storage"'),
get_storage_class,
'django.core.files.non_existing_storage.NonExistingStorage')
'django.core.files.non_existing_storage.NonExistingStorage'
)

class FileStorageTests(unittest.TestCase):
storage_class = FileSystemStorage
Expand Down

0 comments on commit 590bde8

Please sign in to comment.