Skip to content

SentNotification model: better storage of attachments #26

@giaume

Description

@giaume

Here was we currently store for tests.notifications.MyNotification:

[
  {
    "py/tuple": [
      "Report.txt",
      "Some Report Data",
      "text/plain"
    ]
  },
  {
    "py/object": "email.mime.image.MIMEImage",
    "policy": {
      "py/object": "email._policybase.Compat32"
    },
    "_headers": [
      {
        "py/tuple": [
          "Content-Type",
          "image/jpeg"
        ]
      },
      {
        "py/tuple": [
          "MIME-Version",
          "1.0"
        ]
      },
      {
        "py/tuple": [
          "Content-Transfer-Encoding",
          "base64"
        ]
      },
      {
        "py/tuple": [
          "Content-ID",
          "<python.jpg>"
        ]
      }
    ],
    "_unixfrom": null,
    "_payload": <base64>,
   "_charset": null,
    "preamble": null,
    "epilogue": null,
    "defects": [],
    "_default_type": "text/plain"
  }
]

We need to store it in a way we can easily parse it, and get the basics about each attachment: MIME type, file name if any, and of course the payload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions