Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Skip remote tests when hosted verifier is down.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfk committed May 29, 2017
1 parent 4b668d4 commit 46c9ae2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions browserid/tests/test_verifiers.py
Expand Up @@ -126,6 +126,7 @@ def setUp(self):
# There should be a warning about using this verifier.
self.assertEquals(w[0].category, FutureWarning)

@callwith(patched_supportdoc_fetching())
def test_error_handling_in_verify_certificate_chain(self):
self.assertRaises(ValueError,
self.verifier.verify_certificate_chain, [])
Expand Down Expand Up @@ -237,6 +238,18 @@ def _verify(self, requests, response_text='', assertion=EXPIRED_ASSERTION,

return self.verifier.verify(assertion)

def test_expired_assertion(self):
try:
return super(TestRemoteVerifier, self).test_expired_assertion()
except ConnectionError:
raise unittest.SkipTest("error connecting to remote server")

def test_malformed_assertions(self):
try:
return super(TestRemoteVerifier, self).test_malformed_assertions()
except ConnectionError:
raise unittest.SkipTest("error connecting to remote server")

def test_handling_of_valid_response_from_server(self):
response_text = ('{"email": "t@m.com", "status": "okay", '
'"audience": "http://myfavoritebeer.org"}')
Expand Down

0 comments on commit 46c9ae2

Please sign in to comment.