summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw2017-01-28 13:23:39 -0500
committerBarry Warsaw2017-01-28 13:23:39 -0500
commit91e99645ca80185a30a84744cef441bba96cf6a8 (patch)
tree3540c86b26ab6d8031bf14a2d655966b20cb8f31
parent7c97e8fbdb90a1a0de1526d7a6f108e95415d6a0 (diff)
parentba08609f28f7193a020a57e90bb887d59f1543bc (diff)
downloadmailman-91e99645ca80185a30a84744cef441bba96cf6a8.tar.gz
mailman-91e99645ca80185a30a84744cef441bba96cf6a8.tar.zst
mailman-91e99645ca80185a30a84744cef441bba96cf6a8.zip
-rw-r--r--src/mailman/database/tests/test_migrations.py6
-rw-r--r--src/mailman/rest/tests/test_addresses.py4
-rw-r--r--src/mailman/rest/tests/test_header_matches.py2
-rw-r--r--src/mailman/rest/users.py2
-rw-r--r--src/mailman/utilities/tests/test_import.py24
-rw-r--r--tox.ini5
6 files changed, 22 insertions, 21 deletions
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py
index eae3966d7..cba5dbbd5 100644
--- a/src/mailman/database/tests/test_migrations.py
+++ b/src/mailman/database/tests/test_migrations.py
@@ -135,9 +135,9 @@ class TestMigrations(unittest.TestCase):
for i in range(1, 6):
query = sa.sql.select(
[keyvalue_table.c.key, keyvalue_table.c.value]
- ).where(
- keyvalue_table.c.pended_id == i
- )
+ ).where(
+ keyvalue_table.c.pended_id == i
+ )
results[i] = dict([
(r['key'], r['value']) for r in
config.db.store.execute(query).fetchall()
diff --git a/src/mailman/rest/tests/test_addresses.py b/src/mailman/rest/tests/test_addresses.py
index f428e45e3..c8ee71286 100644
--- a/src/mailman/rest/tests/test_addresses.py
+++ b/src/mailman/rest/tests/test_addresses.py
@@ -363,7 +363,7 @@ class TestAddresses(unittest.TestCase):
call_api(
'http://localhost:9001/3.0/addresses/anne@example.com/user', {
'email': 'anne.person@example.org',
- })
+ })
self.assertEqual(cm.exception.code, 409)
def test_user_subresource_post_new_user_no_auto_create(self):
@@ -377,7 +377,7 @@ class TestAddresses(unittest.TestCase):
'http://localhost:9001/3.0/addresses/anne@example.com/user', {
'display_name': 'Anne',
'auto_create': 0,
- })
+ })
self.assertEqual(cm.exception.code, 403)
def test_user_subresource_post_no_such_user(self):
diff --git a/src/mailman/rest/tests/test_header_matches.py b/src/mailman/rest/tests/test_header_matches.py
index 093f97b4e..892d258b0 100644
--- a/src/mailman/rest/tests/test_header_matches.py
+++ b/src/mailman/rest/tests/test_header_matches.py
@@ -60,7 +60,7 @@ class TestHeaderMatches(unittest.TestCase):
'/header-matches', {
'header': 'header',
'pattern': 'pattern',
- })
+ })
self.assertEqual(cm.exception.code, 400)
self.assertEqual(cm.exception.reason,
b'This header match already exists')
diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py
index 44dfba730..2e743bdaf 100644
--- a/src/mailman/rest/users.py
+++ b/src/mailman/rest/users.py
@@ -131,7 +131,7 @@ class _UserBase(CollectionMixin):
is_server_owner=user.is_server_owner,
self_link=self.api.path_to('users/{}'.format(user_id)),
user_id=user_id,
- )
+ )
# Add the password attribute, only if the user has a password. Same
# with the real name. These could be None or the empty string.
if user.password:
diff --git a/src/mailman/utilities/tests/test_import.py b/src/mailman/utilities/tests/test_import.py
index 2406c5b02..b1b4764ff 100644
--- a/src/mailman/utilities/tests/test_import.py
+++ b/src/mailman/utilities/tests/test_import.py
@@ -774,55 +774,55 @@ class TestRosterImport(unittest.TestCase):
'members': {
'anne@example.com': 0,
'bob@example.com': b'bob@ExampLe.Com',
- },
+ },
'digest_members': {
'cindy@example.com': 0,
'dave@example.com': b'dave@ExampLe.Com',
- },
+ },
'passwords': {
'anne@example.com': b'annepass',
'bob@example.com': b'bobpass',
'cindy@example.com': b'cindypass',
'dave@example.com': b'davepass',
- },
+ },
'language': {
'anne@example.com': b'fr',
'bob@example.com': b'de',
'cindy@example.com': b'es',
'dave@example.com': b'it',
- },
+ },
# Usernames are unicode strings in the pickle
'usernames': {
'anne@example.com': 'Anne',
'bob@example.com': 'Bob',
'cindy@example.com': 'Cindy',
'dave@example.com': 'Dave',
- },
+ },
'owner': [
'anne@example.com',
'emily@example.com',
- ],
+ ],
'moderator': [
'bob@example.com',
'fred@example.com',
- ],
+ ],
'accept_these_nonmembers': [
'gene@example.com',
'^gene-.*@example.com',
- ],
+ ],
'hold_these_nonmembers': [
'homer@example.com',
'^homer-.*@example.com',
- ],
+ ],
'reject_these_nonmembers': [
'iris@example.com',
'^iris-.*@example.com',
- ],
+ ],
'discard_these_nonmembers': [
'kenny@example.com',
'^kenny-.*@example.com',
- ],
- }
+ ],
+ }
self._usermanager = getUtility(IUserManager)
language_manager = getUtility(ILanguageManager)
for code in self._pckdict['language'].values():
diff --git a/tox.ini b/tox.ini
index 60133f667..60df374ab 100644
--- a/tox.ini
+++ b/tox.ini
@@ -51,7 +51,8 @@ rcfile = {toxinidir}/coverage.ini
rc = --rcfile={[coverage]rcfile}
[flake8]
-max-line-length = 79
+enable-extensions = U4
exclude = src/mailman/compat/*.py
+hang-closing = True
jobs = 1
-enable-extensions = U4
+max-line-length = 79