summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2018-12-10 09:53:19 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2019-08-15 11:33:04 +0100
commit97de74070d58d3f54ad9fefa09cc431b4151ce86 (patch)
tree17e38d8a5f788aefcc2ea7ff3c219484b43cfc6a /tests
parent21c399ee485f448d069de440d1522407339e77f3 (diff)
remove duplicate and pointless tests
Diffstat (limited to 'tests')
-rw-r--r--tests/db/test_utils.py28
1 files changed, 3 insertions, 25 deletions
diff --git a/tests/db/test_utils.py b/tests/db/test_utils.py
index 71671e32..58a523a2 100644
--- a/tests/db/test_utils.py
+++ b/tests/db/test_utils.py
@@ -274,7 +274,7 @@ class TestDecodeHeader(unittest.TestCase):
expected = u'first\nsecond third fourth fifth'
actual = utils.decode_header(text, normalize=True)
self.assertEqual(actual, expected)
-
+
def test_exchange_quotes_remain(self):
# issue #1347
expected = u'"Mouse, Michaƫl" <x@y.z>'
@@ -625,17 +625,6 @@ class TestExtractBody(unittest.TestCase):
self.assertEqual(actual, expected)
- def test_text_plain_and_other(self):
- mail = email.mime.multipart.MIMEMultipart()
- self._set_basic_headers(mail)
- mail.attach(email.mime.text.MIMEText('This is an email'))
- mail.attach(email.mime.application.MIMEApplication(b'1'))
-
- actual = utils.extract_body(mail)
- expected = 'This is an email'
-
- self.assertEqual(actual, expected)
-
def test_text_plain_with_attachment_text(self):
mail = email.mime.multipart.MIMEMultipart()
self._set_basic_headers(mail)
@@ -679,17 +668,6 @@ class TestExtractBody(unittest.TestCase):
self.assertEqual(actual, expected)
- @mock.patch('alot.db.utils.settings.get', mock.Mock(return_value=False))
- @mock.patch('alot.db.utils.settings.mailcap_find_match',
- mock.Mock(return_value=(None, {'view': 'cat'})))
- def test_types_provided(self):
- # This should not return html, even though html is set to preferred
- # since a types variable is passed
- expected = 'This is an email'
- mail = self._make_mixed_plain_html()
- actual = utils.extract_body(mail, types=['text/plain'])
-
- self.assertEqual(actual, expected)
@mock.patch('alot.db.utils.settings.mailcap_find_match',
mock.Mock(return_value=(None, {'view': 'cat'})))
@@ -867,10 +845,10 @@ class TestFormataddr(unittest.TestCase):
utils.formataddr(email.utils.parseaddr(self.umlauts_and_comma)),
self.umlauts_and_comma
)
-
+
def test_address_only(self):
self.assertEqual(utils.formataddr(("", self.address)), self.address)
-
+
def test_name_and_address_no_comma(self):
self.assertEqual(
utils.formataddr(("Me", self.address)),