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

Commit

Permalink
Add source folders
Browse files Browse the repository at this point in the history
  • Loading branch information
lfir committed Mar 14, 2021
1 parent 30e5952 commit 6cd4936
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.vscode

.directory
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
Empty file added mail_error_notifs/__init__.py
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import From, Mail, PlainTextContent, Subject, To

load_dotenv('./.env')
load_dotenv('../.env')
logging.basicConfig(
filename=PurePath(os.getenv('LOGDIR')) / 'mail_error_notifs.log',
level=logging.ERROR,
Expand Down
Empty file added tests/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions test_mail_error_notifs.py → tests/test_mail_error_notifs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

from dotenv import load_dotenv

from mail_error_notifs import SendGridAPIClient, send_email
from mail_error_notifs.mail_error_notifs import SendGridAPIClient, send_email


class TestScripts(unittest.TestCase):

@classmethod
def setUpClass(cls):
load_dotenv('./.env')
load_dotenv('../.env')

@patch('sys.stdout', new_callable=io.StringIO)
def test_when_email_sent_then_statuscode_printed_is_202(self, mock_stdout):
Expand Down

0 comments on commit 6cd4936

Please sign in to comment.