          """
          File storage prevents directory traversal (files can only be accessed if
          they're below the storage location).
          """
          self.assertRaises(SuspiciousOperation, self.storage.exists, '..')
          self.assertRaises(SuspiciousOperation, self.storage.exists, '/etc/passwd')
  
      def test_file_storage_preserves_filename_case(self):
          """The storage backend should preserve case of filenames."""
          # Create a storage backend associated with the mixed case name
          # directory.
 
</s> remove         self.assertRaises(TypeError, CustomizableView.as_view, foobar="value")
 </s> add         with self.assertRaises(TypeError):
            CustomizableView.as_view(foobar="value") </s> remove         self.assertRaises(ImproperlyConfigured, self.backend)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.backend() </s> remove         self.assertRaises(ValueError, self.storage.url, 'test.file')
 </s> add         with self.assertRaises(ValueError):
            self.storage.url('test.file') </s> remove             self.assertRaises(TypeError, SimpleView.as_view, **kwargs)
 </s> add             with self.assertRaises(TypeError):
                SimpleView.as_view(**kwargs) </s> remove             self.assertRaises(SuspiciousOperation,
                              HttpResponseRedirect, url)
            self.assertRaises(SuspiciousOperation,
                              HttpResponsePermanentRedirect, url)
 </s> add             with self.assertRaises(SuspiciousOperation):
                HttpResponseRedirect(url)
            with self.assertRaises(SuspiciousOperation):
                HttpResponsePermanentRedirect(url)
        with self.assertRaises(SuspiciousOperation):
            self.storage.exists('..')
        with self.assertRaises(SuspiciousOperation):
            self.storage.exists('/etc/passwd')
          """
          File storage prevents directory traversal (files can only be accessed if
          they're below the storage location).
          """
        with self.assertRaises(SuspiciousOperation):
            self.storage.exists('..')
        with self.assertRaises(SuspiciousOperation):
            self.storage.exists('/etc/passwd')
        with self.assertRaises(SuspiciousOperation):
            self.storage.exists('..')
        with self.assertRaises(SuspiciousOperation):
            self.storage.exists('/etc/passwd')
  
      def test_file_storage_preserves_filename_case(self):
          """The storage backend should preserve case of filenames."""
          # Create a storage backend associated with the mixed case name
          # directory.
keep keep keep keep replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/file_storage/tests.py