当前位置: 首页>>代码示例>>Python>>正文


Python views.confirm_email_change函数代码示例

本文整理汇总了Python中student.views.confirm_email_change函数的典型用法代码示例。如果您正苦于以下问题:Python confirm_email_change函数的具体用法?Python confirm_email_change怎么用?Python confirm_email_change使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了confirm_email_change函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_always_rollback

    def test_always_rollback(self, _email_user):
        connection = transaction.get_connection()
        with patch.object(connection, 'rollback', wraps=connection.rollback) as mock_rollback:
            with self.assertRaises(TestException):
                confirm_email_change(self.request, self.key)

            mock_rollback.assert_called_with()
开发者ID:TeachAtTUM,项目名称:edx-platform,代码行数:7,代码来源:test_email.py

示例2: check_confirm_email_change

    def check_confirm_email_change(self, expected_template, expected_context):
        """Call `confirm_email_change` and assert that the content was generated as expected

        `expected_template`: The name of the template that should have been used
            to generate the content
        `expected_context`: The context dictionary that should have been used to
            generate the content
        """
        response = confirm_email_change(self.request, self.key)
        self.assertEquals(mock_render_to_response(expected_template, expected_context).content, response.content)
开发者ID:sigberto,项目名称:edx-platform,代码行数:10,代码来源:test_email.py

示例3: test_always_rollback

    def test_always_rollback(self, rollback, _email_user):
        with self.assertRaises(TestException):
            confirm_email_change(self.request, self.key)

        rollback.assert_called_with()
开发者ID:CEIT-UQ,项目名称:edx-platform,代码行数:5,代码来源:test_email.py


注:本文中的student.views.confirm_email_change函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。