Skip to content
Prev Previous commit
Next Next commit
Address typos
  • Loading branch information
lovelydinosaur committed Aug 15, 2016
commit e76ca6eb8838148ccb1c25a2a8a735a42f644d99
8 changes: 4 additions & 4 deletions rest_framework/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def force_authenticate(request, user=None, token=None):

class DjangoTestAdapter(BaseAdapter):
"""
A transport adaptor for `requests`, that makes requests via the
Django WSGI app, rather than making actual HTTP requests ovet the network.
A transport adapter for `requests`, that makes requests via the
Django WSGI app, rather than making actual HTTP requests over the network.
"""
def __init__(self):
self.app = WSGIHandler()
Expand All @@ -55,9 +55,9 @@ def get_environ(self, request):
# Set request headers.
for key, value in request.headers.items():
key = key.upper()
if key in ('CONNECTION', 'CONTENT_LENGTH', 'CONTENT-TYPE'):
if key in ('CONNECTION', 'CONTENT-LENGTH', 'CONTENT-TYPE'):
continue
kwargs['HTTP_%s' % key] = value
kwargs['HTTP_%s' % key.replace('-', '_')] = value

return self.factory.generic(method, url, **kwargs).environ

Expand Down