Skip to content

Commit 2989685

Browse files
committed
Avoid reduction in code coverage using inline code.
1 parent eccad46 commit 2989685

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎oauth2_provider/oauth2_validators.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -671,10 +671,7 @@ def validate_user(self, username, password, client, request, *args, **kwargs):
671671
http_request=HttpRequest()
672672
http_request.path=request.uri
673673
http_request.method=request.http_method
674-
ifrequest.http_method=="GET":
675-
http_request.GET.update(dict(request.decoded_body))
676-
elifrequest.http_method=="POST":
677-
http_request.POST.update(dict(request.decoded_body))
674+
getattr(http_request, request.http_method).update(dict(request.decoded_body))
678675
http_request.META=request.headers
679676
u=authenticate(http_request, username=username, password=password)
680677
ifuisnotNoneandu.is_active:

0 commit comments

Comments
(0)