Esempio n. 1
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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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)
Esempio n. 6
0
 def test_form_post_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('form_post', {'inputs': {'a': 'a'}})
Esempio n. 7
0
 def test_form_post_missing_inputs(self):
     response = render_template('form_post', {'action': 'action'})
     assert '<form method="post" action="action">' in response
Esempio n. 8
0
 def test_wrong_template(self):
     with pytest.raises(TemplateException):
         render_template('bogus_template', {'action': 'action'})
Esempio n. 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
Esempio n. 10
0
 def test_verify_logout_missing_action(self):
     with pytest.raises(TemplateException):
         render_template("verify_logout", {"id_token_hint": "hint"})
Esempio n. 11
0
 def test_wrong_template(self):
     with pytest.raises(TemplateException):
         render_template('bogus_template', {'action': 'action'})
Esempio n. 12
0
 def test_form_post_missing_action(self):
     with pytest.raises(TemplateException):
         render_template("form_post", {"inputs": {"a": "a"}})
Esempio n. 13
0
 def test_wrong_template(self):
     with pytest.raises(TemplateException):
         render_template("bogus_template", {"action": "action"})
Esempio n. 14
0
 def test_verify_logout_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('verify_logout', {'id_token_hint': 'hint'})
Esempio n. 15
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
Esempio n. 16
0
 def test_verify_logout_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('verify_logout', {'id_token_hint': 'hint'})
Esempio n. 17
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
Esempio n. 18
0
 def test_form_post_missing_action(self):
     with pytest.raises(TemplateException):
         render_template('form_post', {'inputs': {'a': 'a'}})
Esempio n. 19
0
 def test_form_post_missing_inputs(self):
     response = render_template('form_post', {'action': 'action'})
     assert '<form method="post" action="action">' in response
Esempio n. 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
Esempio n. 21
0
 def test_form_post_missing_inputs(self):
     response = render_template("form_post", {"action": "action"})
     assert '<form method="post" action="action">' in response