Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes for failing tests #64

Merged
merged 2 commits into from

2 participants

@dairiki

Here are fixes for some of the currently failing tests.

dairiki added some commits
@dairiki dairiki Fix test broken by 95aa2a9 (change form built-in logging to logging m…
…odule)
4c8d4af
@dairiki dairiki Rename TestAuthRequestMixin so that nose doesn't collect it as a test.
Nose is apparently quite aggressive about what it considers to be a test.
TestAuthRequestMixin was being treated as a test (even though it does not
inherit from unittest.TestCase) solely on account of its name.
45fe1db
@dairiki dairiki referenced this pull request
Open

dead project? #62

@rodrigoprimo rodrigoprimo merged commit b1d3769 into openid:master
@rodrigoprimo
Collaborator

Thanks!

@dairiki dairiki deleted the dairiki:tests branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 12, 2013
  1. @dairiki
  2. @dairiki

    Rename TestAuthRequestMixin so that nose doesn't collect it as a test.

    dairiki authored
    Nose is apparently quite aggressive about what it considers to be a test.
    TestAuthRequestMixin was being treated as a test (even though it does not
    inherit from unittest.TestCase) solely on account of its name.
This page is out of date. Refresh to see the latest.
View
6 openid/test/test_association_response.py
@@ -176,7 +176,7 @@ def mkTest(expected_session_type, session_type_value):
"""
def test(self):
self._doTest(expected_session_type, session_type_value)
- self.failUnlessEqual(0, len(self.messages))
+ self.failUnlessLogEmpty()
return test
@@ -214,9 +214,7 @@ def test_explicitNoEncryption(self):
session_type_value='no-encryption',
expected_session_type='no-encryption',
)
- self.failUnlessEqual(1, len(self.messages))
- self.failUnless(self.messages[0].startswith(
- 'WARNING: OpenID server sent "no-encryption"'))
+ self.failUnlessLogMatches('OpenID server sent "no-encryption"')
test_dhSHA1 = mkTest(
session_type_value='DH-SHA1',
View
6 openid/test/test_auth_request.py
@@ -23,7 +23,7 @@ def isOPIdentifier(self):
class DummyAssoc(object):
handle = "assoc-handle"
-class TestAuthRequestMixin(support.OpenIDTestMixin):
+class AuthRequestTestMixin(support.OpenIDTestMixin):
"""Mixin for AuthRequest tests for OpenID 1 and 2; DON'T add
unittest.TestCase as a base class here."""
@@ -101,7 +101,7 @@ def test_standard(self):
self.failUnlessHasIdentifiers(
msg, self.endpoint.local_id, self.endpoint.claimed_id)
-class TestAuthRequestOpenID2(TestAuthRequestMixin, unittest.TestCase):
+class TestAuthRequestOpenID2(AuthRequestTestMixin, unittest.TestCase):
preferred_namespace = message.OPENID2_NS
def failUnlessHasRealm(self, msg):
@@ -151,7 +151,7 @@ def test_opIdentifierSendsIdentifierSelect(self):
self.failUnlessHasIdentifiers(
msg, message.IDENTIFIER_SELECT, message.IDENTIFIER_SELECT)
-class TestAuthRequestOpenID1(TestAuthRequestMixin, unittest.TestCase):
+class TestAuthRequestOpenID1(AuthRequestTestMixin, unittest.TestCase):
preferred_namespace = message.OPENID1_NS
def setUpEndpoint(self):
Something went wrong with that request. Please try again.