Mercurial > wikked
comparison tests/test_auth.py @ 497:36c3e9b1d1e3
cm: Upgrade all dependencies and fix deprecation issues.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 06 Jun 2020 22:24:38 -0700 |
parents | 6cd51ea6dfcf |
children |
comparison
equal
deleted
inserted
replaced
492:eacacee352f7 | 497:36c3e9b1d1e3 |
---|---|
1 import pytest | 1 import pytest |
2 from configparser import SafeConfigParser | 2 from configparser import ConfigParser |
3 from wikked.auth import ( | 3 from wikked.auth import ( |
4 UserManager, PERM_NAMES, | 4 UserManager, PERM_NAMES, |
5 NoSuchGroupOrUserError, MultipleGroupMembershipError, | 5 NoSuchGroupOrUserError, MultipleGroupMembershipError, |
6 CyclicUserGroupError, InvalidPermissionError) | 6 CyclicUserGroupError, InvalidPermissionError) |
7 | 7 |
8 | 8 |
9 def _user_manager_from_str(txt): | 9 def _user_manager_from_str(txt): |
10 config = SafeConfigParser() | 10 config = ConfigParser() |
11 config.read_string(txt) | 11 config.read_string(txt) |
12 return UserManager(config) | 12 return UserManager(config) |
13 | 13 |
14 | 14 |
15 def _p(name): | 15 def _p(name): |