コード例 #1
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_verify_logout(self):
     response = render_template('verify_logout', {'action': 'action', 'id_token_hint': 'hint',
                                                  'post_logout_redirect_uri': 'http://example.com'})
     assert 'Please verify logout' in response
     assert '<form method="post" action="action">' in response
     assert '<input type="submit">' in response
     assert '<input type="hidden" name="id_token_hint" value="hint"/>' in response
     assert '<input type="hidden" name="post_logout_redirect_uri" value="http://example.com"/>' in response
コード例 #2
0
 def test_verify_logout(self):
     response = render_template('verify_logout', {'action': 'action', 'id_token_hint': 'hint',
                                                  'post_logout_redirect_uri': 'http://example.com'})
     assert 'Please verify logout' in response
     assert '<form method="post" action="action">' in response
     assert '<input type="submit">' in response
     assert '<input type="hidden" name="id_token_hint" value="hint"/>' in response
     assert '<input type="hidden" name="post_logout_redirect_uri" value="http://example.com"/>' in response
コード例 #3
0
 def test_form_post(self):
     response = render_template("form_post", {
         "action": "action",
         "inputs": {
             "a": "a"
         }
     })
     assert '<form method="post" action="action">' in response
     assert '<input type="hidden" name="a" value="a"/>' in response
コード例 #4
0
 def test_form_post(self):
     response = render_template('form_post', {
         'action': 'action',
         'inputs': {
             'a': 'a'
         }
     })
     assert '<form method="post" action="action">' in response
     assert '<input type="hidden" name="a" value="a"/>' in response
コード例 #5
0
 def test_verify_logout(self):
     response = render_template(
         "verify_logout",
         {
             "action": "action",
             "id_token_hint": "hint",
             "post_logout_redirect_uri": "http://example.com",
         },
     )
     assert "Please verify logout" in response
     assert '<form method="post" action="action">' in response
     assert '<input type="submit">' in response
     assert '<input type="hidden" name="id_token_hint" value="hint"/>' in response
     assert (
         '<input type="hidden" name="post_logout_redirect_uri" value="http://example.com"/>'
         in response)
コード例 #6
0
 def test_form_post_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('form_post', {'inputs': {'a': 'a'}})
コード例 #7
0
 def test_form_post_missing_inputs(self):
     response = render_template('form_post', {'action': 'action'})
     assert '<form method="post" action="action">' in response
コード例 #8
0
 def test_wrong_template(self):
     with pytest.raises(TemplateException):
         render_template('bogus_template', {'action': 'action'})
コード例 #9
0
 def test_verify_logout_missing_inputs(self):
     response = render_template("verify_logout", {"action": "action"})
     assert "Please verify logout" in response
     assert '<input type="submit">' in response
     assert '<form method="post" action="action">' in response
コード例 #10
0
 def test_verify_logout_missing_action(self):
     with pytest.raises(TemplateException):
         render_template("verify_logout", {"id_token_hint": "hint"})
コード例 #11
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_wrong_template(self):
     with pytest.raises(TemplateException):
         render_template('bogus_template', {'action': 'action'})
コード例 #12
0
 def test_form_post_missing_action(self):
     with pytest.raises(TemplateException):
         render_template("form_post", {"inputs": {"a": "a"}})
コード例 #13
0
 def test_wrong_template(self):
     with pytest.raises(TemplateException):
         render_template("bogus_template", {"action": "action"})
コード例 #14
0
 def test_verify_logout_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('verify_logout', {'id_token_hint': 'hint'})
コード例 #15
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_verify_logout_missing_inputs(self):
     response = render_template('verify_logout', {'action': 'action'})
     assert 'Please verify logout' in response
     assert '<input type="submit">' in response
     assert '<form method="post" action="action">' in response
コード例 #16
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_verify_logout_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('verify_logout', {'id_token_hint': 'hint'})
コード例 #17
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_form_post(self):
     response = render_template('form_post', {'action': 'action', 'inputs': {'a': 'a'}})
     assert '<form method="post" action="action">' in response
     assert '<input type="hidden" name="a" value="a"/>' in response
コード例 #18
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_form_post_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('form_post', {'inputs': {'a': 'a'}})
コード例 #19
0
ファイル: test_util.py プロジェクト: Magosgruss/pyoidc
 def test_form_post_missing_inputs(self):
     response = render_template('form_post', {'action': 'action'})
     assert '<form method="post" action="action">' in response
コード例 #20
0
 def test_verify_logout_missing_inputs(self):
     response = render_template('verify_logout', {'action': 'action'})
     assert 'Please verify logout' in response
     assert '<input type="submit">' in response
     assert '<form method="post" action="action">' in response
コード例 #21
0
 def test_form_post_missing_inputs(self):
     response = render_template("form_post", {"action": "action"})
     assert '<form method="post" action="action">' in response