              except KeyError:
                  value = list(getattr(settings, name, []))
              for action, items in operations.items():
                  # items my be a single value or an iterable.
                  if isinstance(items, six.string_types):
                      items = [items]
                  if action == 'append':
                      value = value + [item for item in items if item not in value]
                  elif action == 'prepend':
                      value = [item for item in items if item not in value] + value
 
</s> remove             return self.delimiter.join(six.text_type(self.base_field.prepare_value(v)) for v in value)
 </s> add             return self.delimiter.join(str(self.base_field.prepare_value(v)) for v in value) </s> remove             if not value or not isinstance(value, string_types):
 </s> add             if not value or not isinstance(value, str): </s> remove         if isinstance(value, six.string_types):
 </s> add         if isinstance(value, str): </s> remove         elif desc[1] in (Database.STRING, Database.FIXED_CHAR,
                         Database.LONG_STRING):
            value = to_unicode(value)
 </s> add  </s> remove         elif f.geom_type == 'RASTER' and isinstance(value, six.string_types):
 </s> add         elif f.geom_type == 'RASTER' and isinstance(value, str):
                if isinstance(items, str):
              except KeyError:
                  value = list(getattr(settings, name, []))
              for action, items in operations.items():
                  # items my be a single value or an iterable.
                if isinstance(items, str):
                      items = [items]
                  if action == 'append':
                      value = value + [item for item in items if item not in value]
                  elif action == 'prepend':
                      value = [item for item in items if item not in value] + value
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/test/utils.py