          temp = tempfile.NamedTemporaryFile()
          temp.write(b'example file content')
          temp.flush()
  
          with open(temp.name, 'rb') as upload:
              name = os.path.basename(upload.name)
              data = client.action(schema, ['encoding', 'raw_upload'], params={'example': upload})
  
          expected = {
              'method': 'POST',
              'files': {'file': {'name': name, 'content': 'example file content'}},
              'content_type': 'application/octet-stream'
 
</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         temp = tempfile.NamedTemporaryFile()
        temp.write(b'example file content')
        temp.flush()
 </s> add         with tempfile.NamedTemporaryFile(delete=False) as temp:
            temp.write(b'example file content')
            temp.flush()
            temp.seek(0) </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     def __init__(self, **kwargs):
 </s> add     def __init__(self, allow_unicode=False, **kwargs):
            name = os.path.basename(temp.name)
            data = client.action(schema, ['encoding', 'raw_upload'], params={'example': temp})
          temp = tempfile.NamedTemporaryFile()
          temp.write(b'example file content')
          temp.flush()
  
            name = os.path.basename(temp.name)
            data = client.action(schema, ['encoding', 'raw_upload'], params={'example': temp})
            name = os.path.basename(temp.name)
            data = client.action(schema, ['encoding', 'raw_upload'], params={'example': temp})
            name = os.path.basename(temp.name)
            data = client.action(schema, ['encoding', 'raw_upload'], params={'example': temp})
  
          expected = {
              'method': 'POST',
              'files': {'file': {'name': name, 'content': 'example file content'}},
              'content_type': 'application/octet-stream'
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixed tests on Windows. Added unicode support to SlugField 
tests/test_api_client.py