Example #1
0
    def test_render_login_html_to_string_renders_default_if_custom_not_found(
            self, mock_get_template):

        mixin = IdPHandlerViewMixin()

        _ = mixin.render_login_html_to_string()

        mock_get_template.assert_called_once_with('djangosaml2idp/login.html',
                                                  using=None)
Example #2
0
    def test_render_login_hto_to_string_returns_result_of_render(
            self, mock_get_template):

        mixin = IdPHandlerViewMixin()
        rendered = mixin.render_login_html_to_string()

        assert rendered == mock_get_template.return_value.render.return_value
        mock_get_template.return_value.render.assert_called_once_with(
            None, None)