Updated test for auth_plugins to skip Httpasswd when libpass is not available
This commit is contained in:
parent
6e95468714
commit
27f38cc2e3
|
|
@ -3,5 +3,5 @@ nose2
|
|||
six
|
||||
redis
|
||||
wrapt<=1.12.1;python_version<="3.4"
|
||||
libpass
|
||||
bcrypt
|
||||
libpass;python_versions>="3.8"
|
||||
bcrypt;python_versions>="3.8"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,13 @@ class BasicHTTPAuthTestCase(unittest.TestCase):
|
|||
headers = {'Authorization': 'Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxx'}
|
||||
self.assertRaises(AuthenticationError, self.plugin.authenticate, headers, 'localhost', '1234')
|
||||
|
||||
try:
|
||||
import passlib
|
||||
PASSLIB_AVAILABLE = True
|
||||
except ImportError:
|
||||
PASSLIB_AVAILABLE = False
|
||||
|
||||
@unittest.skipUnless(PASSLIB_AVAILABLE, "passlib package is not available")
|
||||
class HtpasswdAuthTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue