mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 21:40:13 +03:00
Tweak to tests for py3
This commit is contained in:
parent
341fa58f06
commit
fe706eb6f1
|
@ -196,7 +196,7 @@ class APIClientTests(APITestCase):
|
|||
schema = client.get('http://api.example.com/')
|
||||
|
||||
temp = tempfile.NamedTemporaryFile()
|
||||
temp.write('example file contents')
|
||||
temp.write(b'example file contents')
|
||||
temp.flush()
|
||||
|
||||
with open(temp.name, 'rb') as upload:
|
||||
|
@ -230,7 +230,7 @@ class APIClientTests(APITestCase):
|
|||
schema = client.get('http://api.example.com/')
|
||||
|
||||
temp = tempfile.NamedTemporaryFile()
|
||||
temp.write('example file contents')
|
||||
temp.write(b'example file contents')
|
||||
temp.flush()
|
||||
|
||||
with open(temp.name, 'rb') as upload:
|
||||
|
|
Loading…
Reference in New Issue
Block a user