Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #34300

Closed (moved)
(moved)
Open
Created May 23, 2020 by Cecylia Bocovich@cohosh

Ensure GetTor's email unit tests are properly formatted

From #34286 (moved):

[comment:3 phw]:

Looks good to me!

On a slightly related note: I believe that an email's body is supposed to be separated by two (rather than one) newlines from its header. GetTor's unit tests are using only one (and mix \n with \r\n). Python's email module is also confused by this and thinks that the body is part of the To field:

{{{ In [1]: from email import message_from_string In [3]: m=message_from_string("From: MAILER-DAEMON@mx1.riseup.net\nSubject: Undelivered Mail Returned to Sender\r\nTo: gettor@torproject.org\n osx en\n") In [6]: m.items() Out[6]: [('From', 'MAILER-DAEMON@mx1.riseup.net'), ('Subject', 'Undelivered Mail Returned to Sender'), ('To', 'gettor@torproject.org\n osx en')] }}}

This seems like something we should fix.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking