summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/envelope.py2
-rw-r--r--alot/commands/globals.py4
-rw-r--r--alot/commands/thread.py2
-rw-r--r--alot/mail/envelope.py (renamed from alot/db/envelope.py)2
-rw-r--r--tests/commands/test_envelope.py2
-rw-r--r--tests/mail/test_envelope.py (renamed from tests/db/test_envelope.py)8
6 files changed, 10 insertions, 10 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 47e7463e..ad6edc3f 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -313,7 +313,7 @@ class EditCommand(Command):
def __init__(self, envelope=None, spawn=None, refocus=True, **kwargs):
"""
:param envelope: email to edit
- :type envelope: :class:`~alot.db.envelope.Envelope`
+ :type envelope: :class:`~alot.mail.envelope.Envelope`
:param spawn: force spawning of editor in a new terminal
:type spawn: bool
:param refocus: m
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index b95d37b9..65e8973b 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -29,7 +29,7 @@ from ..completion.contacts import ContactsCompleter
from ..completion.accounts import AccountCompleter
from ..completion.tags import TagsCompleter
from ..widgets.utils import DialogBox
-from ..db.envelope import Envelope
+from ..mail.envelope import Envelope
from ..settings.const import settings
from ..settings.errors import ConfigError, NoMatchingAccount
from ..utils import argparse as cargparse
@@ -673,7 +673,7 @@ class ComposeCommand(Command):
**kwargs):
"""
:param envelope: use existing envelope
- :type envelope: :class:`~alot.db.envelope.Envelope`
+ :type envelope: :class:`~alot.mail.envelope.Envelope`
:param headers: forced header values
:type headers: dict (str->str)
:param template: name of template to parse into the envelope after
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index ff70289b..0a13b868 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -27,7 +27,7 @@ from .common import RetagPromptCommand
from .envelope import SendCommand
from ..completion.contacts import ContactsCompleter
from ..completion.path import PathCompleter
-from ..db.envelope import Envelope
+from ..mail.envelope import Envelope
from ..db.attachment import Attachment
from ..db.errors import DatabaseROError
from ..settings.const import settings
diff --git a/alot/db/envelope.py b/alot/mail/envelope.py
index f9909308..5a798f19 100644
--- a/alot/db/envelope.py
+++ b/alot/mail/envelope.py
@@ -19,7 +19,7 @@ from urllib.parse import unquote
import gpg
import magic
-from .attachment import Attachment
+from ..db.attachment import Attachment
from .. import __version__
from .. import helper
from .. import crypto
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 = (