File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,28 @@ def tearDown(self):
5454 self .dev_user .delete ()
5555
5656
57+ class TestRegressionIssue315 (BaseTest ):
58+ """
59+ Test to avoid regression for the issue 315: request object
60+ was being reassigned when getting AuthorizationView
61+ """
62+
63+ def test_request_is_not_overwritten (self ):
64+ self .client .login (username = "test_user" , password = "123456" )
65+ query_string = urlencode ({
66+ 'client_id' : self .application .client_id ,
67+ 'response_type' : 'code' ,
68+ 'state' : 'random_state_string' ,
69+ 'scope' : 'read write' ,
70+ 'redirect_uri' : 'http://example.it' ,
71+ })
72+ url = "{url}?{qs}" .format (url = reverse ('oauth2_provider:authorize' ), qs = query_string )
73+
74+ response = self .client .get (url )
75+ self .assertEqual (response .status_code , 200 )
76+ assert 'request' not in response .context_data
77+
78+
5779class TestAuthorizationCodeView (BaseTest ):
5880 def test_skip_authorization_completely (self ):
5981 """
You can’t perform that action at this time.
0 commit comments