              reverse('optional', args=['foo:bar']),
              '/script:name/optional/foo:bar/'
          )
  
      def test_reverse_returns_unicode(self):
          name, expected, args, kwargs = test_data[0]
          self.assertIsInstance(
              reverse(name, args=args, kwargs=kwargs),
              six.text_type
          )
  
      def test_view_not_found_message(self):
          msg = (
              "Reverse for 'non-existent-view' not found. 'non-existent-view' "
              "is not a valid view function or pattern name."
          )
 
</s> remove     if not isinstance(viewname, six.string_types):
 </s> add     if not isinstance(viewname, str): </s> remove         if isinstance(value, six.string_types):
 </s> add         if isinstance(value, str): </s> remove             assert isinstance(to, six.string_types), (
 </s> add             assert isinstance(to, str), ( </s> remove             if not isinstance(pattern, six.string_types) or not self.pattern_regex.match(pattern):
 </s> add             if not isinstance(pattern, str) or not self.pattern_regex.match(pattern): </s> remove             # Class names must be ASCII in Python 2.x, so we forcibly coerce it
            # here to break early if there's a problem.
            to = str(to)
 </s> add 
              reverse('optional', args=['foo:bar']),
              '/script:name/optional/foo:bar/'
          )
  







      def test_view_not_found_message(self):
          msg = (
              "Reverse for 'non-existent-view' not found. 'non-existent-view' "
              "is not a valid view function or pattern name."
          )
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/urlpatterns_reverse/tests.py