diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2015-07-28 11:48:35 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2015-07-28 11:48:35 -0400 |
| commit | 0979b119200872cb433565ae741e2d99d0b311d9 (patch) | |
| tree | ce71db2373d29a1b79ee72b59d8ea6ce8a506b63 | |
| parent | a2440f7d568867916c011a1a7920d7d3e11ab369 (diff) | |
| download | passlib-0979b119200872cb433565ae741e2d99d0b311d9.tar.gz | |
bugfix: tests.utils: added list wrapper, since tuple().index doesn't exist under py25
(fixes issue 58)
| -rw-r--r-- | passlib/tests/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py index bd04a20..b7e9ca4 100644 --- a/passlib/tests/utils.py +++ b/passlib/tests/utils.py @@ -777,8 +777,10 @@ class HandlerCase(TestCase): def find_crypt_replacement(cls, fallback=False): """find other backend which can be used to mock the os_crypt backend""" handler = cls.handler + assert "os_crypt" in handler.backends, "expected os_crypt to be present" if fallback: - idx = handler.backends.index("os_crypt") + 1 + # NOTE: using list() because tuples lack .index under py25 (issue 58) + idx = list(handler.backends).index("os_crypt") + 1 else: idx = 0 for name in handler.backends[idx:]: |
