From 590bde88355b1736717d1d3936ebb4be56961a8c Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 11 Nov 2010 23:03:53 +0000 Subject: [PATCH] Changed a test to be less specific about the exception string it expected. Test suite now passes 100% on PyPy. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14536 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/file_storage/tests.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/regressiontests/file_storage/tests.py b/tests/regressiontests/file_storage/tests.py index 70e3f13ff3..b90bf0e49b 100644 --- a/tests/regressiontests/file_storage/tests.py +++ b/tests/regressiontests/file_storage/tests.py @@ -73,12 +73,14 @@ class GetStorageClassTests(unittest.TestCase): """ 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