This commit is contained in:
dresber
2022-01-06 12:20:11 +01:00
commit 78f9666005
9 changed files with 426 additions and 0 deletions

41
test/test_mail_parser.py Normal file
View File

@@ -0,0 +1,41 @@
"""
"""
# --------------------------------------- #
# imports #
# --------------------------------------- #
from unittest import TestCase
from src.mail_parser import parse_mail_and_return_order
# --------------------------------------- #
# definitions #
# --------------------------------------- #
# --------------------------------------- #
# global vars #
# --------------------------------------- #
# --------------------------------------- #
# functions #
# --------------------------------------- #
# --------------------------------------- #
# classes #
# --------------------------------------- #
# --------------------------------------- #
# main #
# --------------------------------------- #
class TestMailParser(TestCase):
def test_parse_mail_and_return_order(self):
with open("data/test_mail.txt", "r", encoding="utf-8") as test_mail:
test_order_data = parse_mail_and_return_order(test_mail.readlines())
self.assertEqual("Bernhard Dresseo", test_order_data["Name"])