summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-30 14:12:33 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-30 14:12:33 +0100
commitcd35ec5f89cff3ba8c7780209efa7e8b0628744d (patch)
treea5f21a0b08ab2ce8a182f6cce7283f15d8f14dea /tests
parent5dfe5a2831adbe3ec129d2ede1d9039739e98b71 (diff)
db/envelope: move to a new module "mail"
It has nothing to do with the database.
Diffstat (limited to 'tests')
-rw-r--r--tests/commands/test_envelope.py2
-rw-r--r--tests/mail/test_envelope.py (renamed from tests/db/test_envelope.py)8
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/commands/test_envelope.py b/tests/commands/test_envelope.py
index d14cbf1f..9531cb57 100644
--- a/tests/commands/test_envelope.py
+++ b/tests/commands/test_envelope.py
@@ -24,7 +24,7 @@ import unittest
from unittest import mock
from alot.commands import envelope
-from alot.db.envelope import Envelope
+from alot.mail.envelope import Envelope
from alot.errors import GPGProblem
from alot.settings.errors import NoMatchingAccount
from alot.settings.manager import SettingsManager
diff --git a/tests/db/test_envelope.py b/tests/mail/test_envelope.py
index 0d46ba43..e3034b48 100644
--- a/tests/db/test_envelope.py
+++ b/tests/mail/test_envelope.py
@@ -21,7 +21,7 @@ import tempfile
import unittest
from unittest import mock
-from alot.db import envelope
+from alot.mail import envelope
SETTINGS = {
'user_agent': 'agent',
@@ -61,7 +61,7 @@ class TestEnvelope(unittest.TestCase):
actual = email.message_from_bytes(raw, policy = mail.policy)
self.assertEmailEqual(mail, actual)
- @mock.patch('alot.db.envelope.settings', SETTINGS)
+ @mock.patch('alot.mail.envelope.settings', SETTINGS)
def test_construct_mail_simple(self):
"""Very simple envelope with a To, From, Subject, and body."""
headers = {
@@ -73,7 +73,7 @@ class TestEnvelope(unittest.TestCase):
bodytext='Test')
self._test_mail(e)
- @mock.patch('alot.db.envelope.settings', SETTINGS)
+ @mock.patch('alot.mail.envelope.settings', SETTINGS)
def test_construct_mail_with_attachment(self):
"""Very simple envelope with a To, From, Subject, body and attachment.
"""
@@ -91,7 +91,7 @@ class TestEnvelope(unittest.TestCase):
self._test_mail(e)
- @mock.patch('alot.db.envelope.settings', SETTINGS)
+ @mock.patch('alot.mail.envelope.settings', SETTINGS)
def test_parse_template(self):
"""Tests multi-line header and body parsing"""
raw = (