  
      def test_load_library_importerror(self):
          PlainHasher = type(str('PlainHasher'), (BasePasswordHasher,),
                             {'algorithm': 'plain', 'library': 'plain'})
          with self.assertRaises(ValueError) as e:
              PlainHasher()._load_library()
          self.assertEqual("Couldn't load 'PlainHasher' algorithm library: "
                           "No module named plain", str(e.exception))
 
</s> remove         self.assertEqual("Couldn't load 'PlainHasher' algorithm library: "
                         "No module named plain", str(e.exception))
 </s> add 
        # Python 3.3 adds quotes around module name
        with six.assertRaisesRegex(self, ValueError,
                "Couldn't load 'PlainHasher' algorithm library: No module named '?plain'?"):
  
      def test_load_library_importerror(self):
          PlainHasher = type(str('PlainHasher'), (BasePasswordHasher,),
                             {'algorithm': 'plain', 'library': 'plain'})
        # Python 3.3 adds quotes around module name
        with six.assertRaisesRegex(self, ValueError,
                "Couldn't load 'PlainHasher' algorithm library: No module named '?plain'?"):
              PlainHasher()._load_library()
          self.assertEqual("Couldn't load 'PlainHasher' algorithm library: "
                           "No module named plain", str(e.exception))
keep keep keep keep replace keep keep keep
 Worked around Python 3.3 modified exception repr

Refs #20599. 
django/contrib/auth/tests/test_hashers.py