summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email/test_message.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_email/test_message.py')
-rw-r--r--Lib/test/test_email/test_message.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/Lib/test/test_email/test_message.py b/Lib/test/test_email/test_message.py
index 51ddf36..50e1a63 100644
--- a/Lib/test/test_email/test_message.py
+++ b/Lib/test/test_email/test_message.py
@@ -722,15 +722,25 @@ class TestEmailMessageBase:
def test_is_attachment(self):
m = self._make_message()
- self.assertFalse(m.is_attachment)
+ self.assertFalse(m.is_attachment())
+ with self.assertWarns(DeprecationWarning):
+ self.assertFalse(m.is_attachment)
m['Content-Disposition'] = 'inline'
- self.assertFalse(m.is_attachment)
+ self.assertFalse(m.is_attachment())
+ with self.assertWarns(DeprecationWarning):
+ self.assertFalse(m.is_attachment)
m.replace_header('Content-Disposition', 'attachment')
- self.assertTrue(m.is_attachment)
+ self.assertTrue(m.is_attachment())
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(m.is_attachment)
m.replace_header('Content-Disposition', 'AtTachMent')
- self.assertTrue(m.is_attachment)
+ self.assertTrue(m.is_attachment())
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(m.is_attachment)
m.set_param('filename', 'abc.png', 'Content-Disposition')
- self.assertTrue(m.is_attachment)
+ self.assertTrue(m.is_attachment())
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(m.is_attachment)
class TestEmailMessage(TestEmailMessageBase, TestEmailBase):