Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Docstring updates and notaion
Browse files Browse the repository at this point in the history
  • Loading branch information
schmelz21 committed Oct 8, 2021
1 parent 27378c8 commit f0c4f75
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/test_pe_mailer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""File to be used to create test for pe-reports."""
"""File to be used to create test for pe-mailer module."""

# Standard Python Libraries
import logging
Expand Down
20 changes: 10 additions & 10 deletions tests/test_pe_mailer_pe_mesage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""This module contains the tests for the PandEMessage class."""
"""This module contains the tests for the PEMessage class."""

# Standard Python Libraries
import unittest
Expand All @@ -8,18 +8,18 @@


class Test(unittest.TestCase):
"""The tests for the PandEMessage class."""
"""The tests for the PEMessage class."""

def test_four_params_single_recipient(self):
"""Test the 4-parameter version of the constructor."""
to = ["recipient@example.com"]
pdf = "./tests/data/pdf-sample.pdf"
report_date = "December 15, 2001"
report_date = "December 15, 2020"

message = PEMessage(pdf, report_date, to)
self.assertEqual(message["From"], "reports@cyber.dhs.gov")
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
message["Subject"], "Posture and Exposure Report - December 15, 2020"
)
self.assertEqual(message.get("CC"), None)
self.assertEqual(
Expand Down Expand Up @@ -93,13 +93,13 @@ def test_four_params_multiple_recipients(self):
"""Test the 4-parameter version of the constructor."""
to = ["recipient@example.com", "recipient2@example.com"]
pdf = "./tests/data/pdf-sample.pdf"
report_date = "December 15, 2001"
report_date = "December 15, 2020"

message = PEMessage(pdf, report_date, to)

self.assertEqual(message["From"], "reports@cyber.dhs.gov")
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
message["Subject"], "Posture and Exposure Report - December 15, 2020"
)
self.assertEqual(message.get("CC"), None)
self.assertEqual(
Expand Down Expand Up @@ -177,15 +177,15 @@ def test_six_params_single_cc(self):
cc = ["cc@example.com"]
bcc = ["bcc@example.com", "bcc2@example.com"]

report_date = "December 15, 2001"
report_date = "December 15, 2020"

message = PEMessage(
pdf, report_date, to, from_addr=fm, cc_addrs=cc, bcc_addrs=bcc
)

self.assertEqual(message["From"], fm)
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
message["Subject"], "Posture and Exposure Report - December 15, 2020"
)
self.assertEqual(message["CC"], "cc@example.com")
self.assertEqual(message["BCC"], "bcc@example.com,bcc2@example.com")
Expand Down Expand Up @@ -261,15 +261,15 @@ def test_six_params_multiple_cc(self):
cc = ["cc@example.com", "cc2@example.com"]
bcc = ["bcc@example.com", "bcc2@example.com"]

report_date = "December 15, 2001"
report_date = "December 15, 2020"

message = PEMessage(
pdf, report_date, to, from_addr=fm, cc_addrs=cc, bcc_addrs=bcc
)

self.assertEqual(message["From"], fm)
self.assertEqual(
message["Subject"], "Posture and Exposure Report - December 15, 2001"
message["Subject"], "Posture and Exposure Report - December 15, 2020"
)
self.assertEqual(message["CC"], "cc@example.com,cc2@example.com")
self.assertEqual(message["BCC"], "bcc@example.com,bcc2@example.com")
Expand Down

0 comments on commit f0c4f75

Please sign in to comment.