예제 #1
0
    def test_disqus_sso_if_user_is_anonymous(self):

        context = {'user': FakeAnonUser()}

        output = disqus_sso(context)
        self.assertEqual(output, '')
예제 #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)
예제 #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)
예제 #4
0
    def test_disqus_sso_if_user_is_anonymous(self):

        context = {'user': FakeAnonUser()}

        output = disqus_sso(context)
        self.assertEqual(output, '')
예제 #5
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)
예제 #6
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)