Explorar o código

test: fix Py 37 CI test

Mikael Koli %!s(int64=3) %!d(string=hai) anos
pai
achega
70dc7c3607
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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",