      outputs = {}
      field = serializers.SlugField()
  
  
  class TestURLField(FieldValues):
      """
      Valid and invalid values for `URLField`.
      """
      valid_inputs = {
 
</s> remove         slug_regex = re.compile(r'^[-a-zA-Z0-9_]+$')
        validator = RegexValidator(slug_regex, message=self.error_messages['invalid'])
 </s> add         self.allow_unicode = allow_unicode
        if self.allow_unicode:
            validator = RegexValidator(re.compile(r'^[-\w]+\Z', re.UNICODE), message=self.error_messages['invalid_unicode'])
        else:
            validator = RegexValidator(re.compile(r'^[-a-zA-Z0-9_]+$'), message=self.error_messages['invalid']) </s> remove         with open(temp.name, 'rb') as upload:
            name = os.path.basename(upload.name)
            data = client.action(schema, ['encoding', 'multipart'], params={'example': upload})
 </s> add             name = os.path.basename(temp.name)
            data = client.action(schema, ['encoding', 'multipart'], params={'example': temp}) </s> remove         with open(temp.name, 'rb') as upload:
            name = os.path.basename(upload.name)
            data = client.action(schema, ['encoding', 'raw_upload'], params={'example': upload})
 </s> add             name = os.path.basename(temp.name)
            data = client.action(schema, ['encoding', 'raw_upload'], params={'example': temp}) </s> remove         'invalid': _('Enter a valid "slug" consisting of letters, numbers, underscores or hyphens.')
 </s> add         'invalid': _('Enter a valid "slug" consisting of letters, numbers, underscores or hyphens.'),
        'invalid_unicode': _('Enter a valid "slug" consisting of Unicode letters, numbers, underscores, or hyphens.') </s> remove     def __init__(self, **kwargs):
 </s> add     def __init__(self, allow_unicode=False, **kwargs):
    def test_allow_unicode_true(self):
        field = serializers.SlugField(allow_unicode=True)

        validation_error = False
        try:
            field.run_validation(u'slug-99-\u0420')
        except serializers.ValidationError:
            validation_error = True

        assert not validation_error

      outputs = {}
      field = serializers.SlugField()
  
    def test_allow_unicode_true(self):
        field = serializers.SlugField(allow_unicode=True)

        validation_error = False
        try:
            field.run_validation(u'slug-99-\u0420')
        except serializers.ValidationError:
            validation_error = True

        assert not validation_error

  
  class TestURLField(FieldValues):
      """
      Valid and invalid values for `URLField`.
      """
      valid_inputs = {
keep keep add keep keep keep keep keep keep
 Fixed tests on Windows. Added unicode support to SlugField 
tests/test_fields.py