def test_location_empty(self): msg = ( "The storage backend of the staticfiles finder " "<class 'django.contrib.staticfiles.finders.DefaultStorageFinder'> " "doesn't have a valid location.") with self.assertRaisesMessage(ImproperlyConfigured, msg): finders.DefaultStorageFinder()
def setUp(self): super(TestDefaultStorageFinder, self).setUp() self.finder = finders.DefaultStorageFinder( storage=storage.StaticFilesStorage(location=settings.MEDIA_ROOT)) test_file_path = os.path.join(settings.MEDIA_ROOT, 'media-file.txt') self.find_first = ('media-file.txt', test_file_path) self.find_all = ('media-file.txt', [test_file_path])
def test_location_empty(self): with self.assertRaises(ImproperlyConfigured): finders.DefaultStorageFinder()