Skip to content

Commit

Permalink
30 days check
Browse files Browse the repository at this point in the history
tauqirsarwar1 committed Apr 19, 2024
1 parent 8b7d2cb commit 8b0a396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/frontend/common/step_definitions/email.py
Original file line number Diff line number Diff line change
@@ -29,15 +29,15 @@ def check_email(user_type, selenium_generics: SeleniumGenerics):

yesterday = today - timedelta(days=1)
date_today = today.strftime("%d %b %Y")
date_yesterday = yesterday.strftime("%d %b %Y")
date_old = yesterday.strftime("%d %b %Y")
if '0' in date_today[0]:
date_today = date_today[1:]
f = open(test_data_dir)
data = json.load(f)
for i in data:
value = i
if ("Test Project Data" in value["Subject"] and "[email protected]" in value["From"]) \
and (date_today in value["Date"] or date_yesterday in value["Date"]) and (user_type in value["To"]):
and (date_old < value["Date"]) and (user_type in value["To"]):
decoded_data = base64.b64decode(value["Message"])
soup = BeautifulSoup(decoded_data, "lxml")
email_body = str(soup.body()[0])

0 comments on commit 8b0a396

Please sign in to comment.