From 9c32f8a28c0e555537ee0c8236e099a6990dacbc Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Wed, 15 Aug 2018 16:33:44 +0200 Subject: Use unittest.mock from the stdlib It was added to the stdlib in py3.3 and we already require 3.5. --- tests/commands/test_envelope.py | 3 +-- tests/commands/test_global.py | 3 +-- tests/commands/test_init.py | 3 +-- tests/commands/test_thread.py | 3 +-- tests/commands/utils_tests.py | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) (limited to 'tests/commands') diff --git a/tests/commands/test_envelope.py b/tests/commands/test_envelope.py index 76aa7e88..a5d86d94 100644 --- a/tests/commands/test_envelope.py +++ b/tests/commands/test_envelope.py @@ -21,8 +21,7 @@ import os import tempfile import textwrap import unittest - -import mock +from unittest import mock from alot.commands import envelope from alot.db.envelope import Envelope diff --git a/tests/commands/test_global.py b/tests/commands/test_global.py index 9ef3d957..23c216ab 100644 --- a/tests/commands/test_global.py +++ b/tests/commands/test_global.py @@ -20,8 +20,7 @@ import logging import os import tempfile import unittest - -import mock +from unittest import mock from alot.commands import globals as g_commands diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index a2b358ff..29828b9a 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -4,8 +4,7 @@ import argparse import unittest - -import mock +from unittest import mock from alot import commands from alot.commands import thread diff --git a/tests/commands/test_thread.py b/tests/commands/test_thread.py index 3d4268aa..335ca388 100644 --- a/tests/commands/test_thread.py +++ b/tests/commands/test_thread.py @@ -6,8 +6,7 @@ """Test suite for alot.commands.thread module.""" import email import unittest - -import mock +from unittest import mock from alot.commands import thread from alot.account import Account diff --git a/tests/commands/utils_tests.py b/tests/commands/utils_tests.py index 0642ad32..63863db8 100644 --- a/tests/commands/utils_tests.py +++ b/tests/commands/utils_tests.py @@ -18,9 +18,9 @@ import tempfile import os import shutil import unittest +from unittest import mock import gpg -import mock from alot import crypto from alot import errors -- cgit v1.2.3