summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mailman/bin/tests/test_mailman.py2
-rw-r--r--src/mailman/commands/tests/test_conf.py2
-rw-r--r--src/mailman/commands/tests/test_import.py2
-rw-r--r--src/mailman/config/tests/test_configuration.py2
-rw-r--r--src/mailman/database/tests/test_factory.py2
-rw-r--r--src/mailman/docs/NEWS.rst1
-rw-r--r--src/mailman/runners/tests/test_nntp.py2
-rw-r--r--src/mailman/testing/helpers.py2
-rw-r--r--src/mailman/utilities/tests/test_import.py2
9 files changed, 9 insertions, 8 deletions
diff --git a/src/mailman/bin/tests/test_mailman.py b/src/mailman/bin/tests/test_mailman.py
index 8c5a3396b..38c684425 100644
--- a/src/mailman/bin/tests/test_mailman.py
+++ b/src/mailman/bin/tests/test_mailman.py
@@ -25,8 +25,8 @@ __all__ = [
import unittest
from io import StringIO
-from mock import patch
from mailman.bin.mailman import main
+from unittest.mock import patch
diff --git a/src/mailman/commands/tests/test_conf.py b/src/mailman/commands/tests/test_conf.py
index 5ff93895d..7412b5dec 100644
--- a/src/mailman/commands/tests/test_conf.py
+++ b/src/mailman/commands/tests/test_conf.py
@@ -24,13 +24,13 @@ __all__ = [
import os
import sys
-import mock
import tempfile
import unittest
from io import StringIO
from mailman.commands.cli_conf import Conf
from mailman.testing.layers import ConfigLayer
+from unittest import mock
diff --git a/src/mailman/commands/tests/test_import.py b/src/mailman/commands/tests/test_import.py
index 96f955e52..9da0dac5b 100644
--- a/src/mailman/commands/tests/test_import.py
+++ b/src/mailman/commands/tests/test_import.py
@@ -27,8 +27,8 @@ import unittest
from mailman.app.lifecycle import create_list
from mailman.commands.cli_import import Import21
from mailman.testing.layers import ConfigLayer
-from mock import patch
from pkg_resources import resource_filename
+from unittest.mock import patch
diff --git a/src/mailman/config/tests/test_configuration.py b/src/mailman/config/tests/test_configuration.py
index 5a245c8b7..b45767cb7 100644
--- a/src/mailman/config/tests/test_configuration.py
+++ b/src/mailman/config/tests/test_configuration.py
@@ -25,7 +25,6 @@ __all__ = [
import os
-import mock
import tempfile
import unittest
@@ -37,6 +36,7 @@ from mailman.interfaces.configuration import (
from mailman.testing.helpers import configuration, event_subscribers
from mailman.testing.layers import ConfigLayer
from pkg_resources import resource_filename
+from unittest import mock
diff --git a/src/mailman/database/tests/test_factory.py b/src/mailman/database/tests/test_factory.py
index acb7c32a4..b0133c5ef 100644
--- a/src/mailman/database/tests/test_factory.py
+++ b/src/mailman/database/tests/test_factory.py
@@ -31,10 +31,10 @@ from mailman.database.factory import LAST_STORM_SCHEMA_VERSION, SchemaManager
from mailman.database.model import Model
from mailman.interfaces.database import DatabaseError
from mailman.testing.layers import ConfigLayer
-from mock import patch
from sqlalchemy import MetaData, Table, Column, Integer, Unicode
from sqlalchemy.exc import ProgrammingError, OperationalError
from sqlalchemy.schema import Index
+from unittest.mock import patch
diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst
index f6d381a7d..db86363e4 100644
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -37,6 +37,7 @@ Bugs
backported smtpd module which can accept non-UTF-8 data. (Closes #140)
* Bulk emails are now decorated with headers and footers. Given by Aurélien
Bompard. (Closes #145)
+ * Core no longer depends on the standalone `mock` module. (Closes: #146)
Configuration
-------------
diff --git a/src/mailman/runners/tests/test_nntp.py b/src/mailman/runners/tests/test_nntp.py
index 6f3994c75..bfa87e942 100644
--- a/src/mailman/runners/tests/test_nntp.py
+++ b/src/mailman/runners/tests/test_nntp.py
@@ -23,7 +23,6 @@ __all__ = [
]
-import mock
import socket
import nntplib
import unittest
@@ -36,6 +35,7 @@ from mailman.testing.helpers import (
LogFileMark, configuration, get_queue_messages, make_testable_runner,
specialized_message_from_string as mfs)
from mailman.testing.layers import ConfigLayer
+from unittest import mock
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py
index 8fa4fbd2f..b05847b42 100644
--- a/src/mailman/testing/helpers.py
+++ b/src/mailman/testing/helpers.py
@@ -40,7 +40,6 @@ __all__ = [
import os
import json
-import mock
import time
import uuid
import errno
@@ -67,6 +66,7 @@ from mailman.interfaces.styles import IStyleManager
from mailman.interfaces.usermanager import IUserManager
from mailman.runners.digest import DigestRunner
from mailman.utilities.mailbox import Mailbox
+from unittest import mock
from urllib.error import HTTPError
from urllib.parse import urlencode
from zope import event
diff --git a/src/mailman/utilities/tests/test_import.py b/src/mailman/utilities/tests/test_import.py
index a0b1767c1..dd3940cdd 100644
--- a/src/mailman/utilities/tests/test_import.py
+++ b/src/mailman/utilities/tests/test_import.py
@@ -29,7 +29,6 @@ __all__ = [
import os
-import mock
import unittest
from datetime import timedelta, datetime
@@ -56,6 +55,7 @@ from mailman.utilities.importer import import_config_pck, Import21Error
from mailman.utilities.string import expand
from pickle import load
from pkg_resources import resource_filename
+from unittest import mock
from zope.component import getUtility