예제 #1
0
파일: tests.py 프로젝트: BIGGANI/PyLucid
    def test_https_login_link(self):
        pref_form = AuthPreferencesForm()
        pref_form["https_urls"] = True
        pref_form.save()

        pref_form = AuthPreferencesForm()
        preferences = pref_form.get_preferences()
        self.assertTrue(preferences["https_urls"])

        response = self.client.get("/en/welcome/")
        self.assertDOM(response,
            must_contain=(
                '''<a href="#top" id="login_link" rel="nofollow" onclick="window.location.href = 'https://testserver/en/welcome/?auth=login'; return false;">Log in</a>''',
            )
        )
예제 #2
0
    def test_https_login_link(self):
        pref_form = AuthPreferencesForm()
        pref_form["https_urls"] = True
        pref_form.save()

        pref_form = AuthPreferencesForm()
        preferences = pref_form.get_preferences()
        self.assertTrue(preferences["https_urls"])

        response = self.client.get("/en/welcome/")
        self.assertDOM(
            response,
            must_contain=
            ('''<a href="#top" id="login_link" rel="nofollow" onclick="window.location.href = 'https://testserver/en/welcome/?auth=login'; return false;">Log in</a>''',
             ))