Exemple #1
0
    def test_disqus_sso_if_user_is_anonymous(self):

        context = {'user': FakeAnonUser()}

        output = disqus_sso(context)
        self.assertEqual(output, '')
Exemple #2
0
    def test_disqus_sso_if_there_is_no_public_key(self):

        msg = 'You need to set DISQUS_PUBLIC_KEY before you can use SSO'

        output = disqus_sso({})
        self.assertIn(msg, output)
Exemple #3
0
    def test_disqus_sso_if_there_is_no_secret_key(self):

        msg = 'You need to set DISQUS_SECRET_KEY before you can use SSO'

        output = disqus_sso({})
        self.assertIn(msg, output)
    def test_disqus_sso_if_user_is_anonymous(self):

        context = {'user': FakeAnonUser()}

        output = disqus_sso(context)
        self.assertEqual(output, '')
    def test_disqus_sso_if_there_is_no_public_key(self):

        msg = 'You need to set DISQUS_PUBLIC_KEY before you can use SSO'

        output = disqus_sso({})
        self.assertIn(msg, output)
    def test_disqus_sso_if_there_is_no_secret_key(self):

        msg = 'You need to set DISQUS_SECRET_KEY before you can use SSO'

        output = disqus_sso({})
        self.assertIn(msg, output)