Kaynağa Gözat

alter tests to comply with rfc

roy 3 yıl önce
ebeveyn
işleme
e36ae87029

+ 4 - 4
redmail/test/email/test_body.py

@@ -39,7 +39,7 @@ def test_text_message():
     MIME-Version: 1.0
 
     Hi, nice to meet you.
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
 
 
 def test_html_message():
@@ -80,7 +80,7 @@ def test_html_message():
     --===============<ID>==--
 
     --===============<ID>==--
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
 
 
 def test_text_and_html_message():
@@ -129,7 +129,7 @@ def test_text_and_html_message():
     --===============<ID>==--
 
     --===============<ID>==--
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
 
 
 @pytest.mark.parametrize(
@@ -246,7 +246,7 @@ def test_without_jinja(use_jinja_obj, use_jinja):
     --===============<ID>==--
 
     --===============<ID>==--
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
     if IS_PY37:
         expected = expected.replace('sender.full_n=\n', 'sender.full_n')
     msg = prune_generated_headers(str(msg))

+ 1 - 1
redmail/test/email/test_cookbook.py

@@ -56,4 +56,4 @@ def test_distributions():
     Message-ID: <<message_id>>
     Date: <date>
     
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')

+ 3 - 3
redmail/test/email/test_headers.py

@@ -73,7 +73,7 @@ def test_cc_bcc():
     Message-ID: <<message_id>>
     Date: <date>
 
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
 
 @pytest.mark.parametrize("how", ["instance", "email"])
 def test_custom_headers(how):
@@ -107,7 +107,7 @@ def test_custom_headers(how):
     Date: <date>
     Importance: high
 
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
 
 @pytest.mark.parametrize("how", ["instance", "email"])
 def test_custom_headers_override(how):
@@ -135,4 +135,4 @@ def test_custom_headers_override(how):
     Message-ID: <167294165062.31860.1664530310632362057@LAPTOP-1234GML0>
     Date: Sun, 31 Jan 2021 06:56:46 +0000
 
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')

+ 1 - 1
redmail/test/email/test_template.py

@@ -103,7 +103,7 @@ def test_jinja_env(tmpdir):
     --===============<ID>==--
 
     --===============<ID>==--
-    """)[1:]
+    """)[1:].replace('\n', '\r\n')
 
 def test_body_and_template_error(tmpdir):