def test_string_representation_when_name_is_bytes_and_non_ascii(self):
     exc = self.make_exception(force_bytes('../Äö'))
     assert (
         text_type(exc) ==
         force_text('The file "../Äö" is not within the storage.')
     )
 def test_string_representation_when_name_is_bytes_and_non_ascii(self):
     exc = self.make_exception(force_bytes('Äö'))
     assert text_type(exc) == force_text('The file "Äö" was not found.')
 def test_string_representation(self):
     exc = self.make_exception('../etc/passwd')
     assert (
         text_type(exc) ==
         force_text('The file "../etc/passwd" is not within the storage.')
     )
 def test_string_representation(self):
     exc = self.make_exception('README.rst')
     assert (
         text_type(exc) ==
         force_text('The file "README.rst" was not found.')
     )