瀏覽代碼

test: fix Py 37 CI test

Mikael Koli 3 年之前
父節點
當前提交
70dc7c3607
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      redmail/test/email/test_headers.py

+ 7 - 0
redmail/test/email/test_headers.py

@@ -80,6 +80,13 @@ def test_custom_headers(how):
     email = EmailSender(host=None, port=1234)
     headers = {"Importance": "high"}
 
+    if IS_PY37:
+        # Python <=3.7 has problems with domain names with UTF-8
+        # This is mostly problem with CI.
+        # We simulate realistic domain name
+        domain = "REDMAIL-1234.mail.com"
+        email.domain = domain
+
     if how == "email":
         msg = email.get_message(
             sender="me@example.com",