Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

who now warns, rather than raising, on missing / invalid config rile.

  • Loading branch information...
commit 88fccf1b95a76ef58df659a5ba184ff93c3d84c6 1 parent 7a7b896
@tseaver tseaver authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 pyramid_who/tests/test_whov2.py
View
10 pyramid_who/tests/test_whov2.py
@@ -67,11 +67,17 @@ def test_instance_conforms_to_IAuthenticationPolicy(self):
verifyObject(IAuthenticationPolicy, self._makeOne())
def test_ctor_invalid_config_file_name(self):
- self.assertRaises(Exception, self._makeOne, '/nonesuch')
+ import warnings
+ with warnings.catch_warnings(record=True) as log:
+ policy = self._makeOne('/nonesuch')
+ self.assertEqual(len(log), 1)
def test_ctor_invalid_config_file_content(self):
+ import warnings
filename = self._makeFile('not-ini.txt', text='this is not an INI file')
- self.assertRaises(Exception, self._makeOne, filename)
+ with warnings.catch_warnings(record=True) as log:
+ policy = self._makeOne(filename)
+ self.assertEqual(len(log), 1)
def test_unauthenticated_userid_no_identity_in_environ(self):
ENVIRON = {'wsgi.version': '1.0',
Please sign in to comment.
Something went wrong with that request. Please try again.