Skip to content

fix: Disable mail system #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 28, 2021
Merged

fix: Disable mail system #316

merged 2 commits into from
Sep 28, 2021

Conversation

orronai
Copy link
Collaborator

@orronai orronai commented Sep 26, 2021

  • Added TESTING attribute to the configuration file which disables the mail system.
  • Added instructions to the README file.

- Added TESTING attribute to the configuration file which disables the mail system.
- Added instructions to the README file.
@orronai orronai requested a review from gal432 September 26, 2021 16:20
@codecov
Copy link

codecov bot commented Sep 26, 2021

Codecov Report

Merging #316 (ba5adb6) into master (33c8dc8) will increase coverage by 0.02%.
The diff coverage is 93.33%.

❗ Current head ba5adb6 differs from pull request most recent head 42e1fa3. Consider uploading reports for the commit 42e1fa3 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   84.17%   84.20%   +0.02%     
==========================================
  Files          60       60              
  Lines        2541     2552      +11     
==========================================
+ Hits         2139     2149      +10     
- Misses        402      403       +1     
Impacted Files Coverage Δ
lms/utils/mail.py 97.22% <93.33%> (-2.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33c8dc8...42e1fa3. Read the comment docs.

@@ -22,6 +22,7 @@ MAIL_USE_TLS = False
MAIL_USERNAME = 'username@gmail.com'
MAIL_PASSWORD = 'password'
MAIL_DEFAULT_SENDER = 'username@gmail.com'
TESTING = True # On production, delete this line!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe MAIL_DISABLED? Or just check that MAIL_SERVER is None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change a "TESTING" variable in our configuration file manually.
If we want, we should adjust it in the conftest.py or add a pytest script that would do it for us.
We can add a DISABLE_MAIL that uses this variable -- but this name for a configuration variable is problematic

@yammesicka yammesicka merged commit 95a3f60 into master Sep 28, 2021
@yammesicka yammesicka deleted the disable-mail-system branch September 28, 2021 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants