Skip to content
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

Feat: Email with any SMTP server + Testing Email #13

Merged
merged 13 commits into from
Nov 28, 2023
Merged

Feat: Email with any SMTP server + Testing Email #13

merged 13 commits into from
Nov 28, 2023

Conversation

Reimirno
Copy link

@Reimirno Reimirno commented Nov 20, 2023

This PR revamped the email sending feature. There are three highlights:

  • Generic SMTP email provider support
  • Extensible Email Templating
  • 3 Ways to Test Email Feature

Generic SMTP email provider support

This PR removed sendgrid-related stuff from repo and now allows emails to be handled by any generic smtp server, specified by these four env vars:

EMAIL_SERVER=
EMAIL_PORT=
EMAIL_USE_TLS=
EMAIL_USERNAME=

Extensible Email Templating

This PR removed the hardcoded template using a python string and the awkward substitution symbols. It now supports a file-based template and metadata, and a enum to select from different template. This makes adding template in future much easier.

3 Ways to Test Email Feature

This PR added 3 ways to test email feature:

  • stubbing out the python SMTP module to not do anything but verify that relevant methods (send_message etc) are called. (Will be tested in CI)
  • spinning up a local smtp server and route email through that server instead. (Will be tested in CI)
  • allows runtime override of target email address. (Can be tested mannually)

I have written 5 test cases to cover the emailing feature for both plain text and html content.

The documentation is updated accordingly.

@Reimirno Reimirno changed the title Email with any SMTP server + Testing Email Feat: Email with any SMTP server + Testing Email Nov 20, 2023
Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py26196%13
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL94849248% 

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.495s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py26196%13
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL94849248% 

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.397s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py261638%13, 17–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL94851845% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 2.811s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py26196%13
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL94849248% 

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.481s ⏱️

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (561c9d4) 47.49% compared to head (f408505) 49.79%.

Files Patch % Lines
server/services/email/__init__.py 31.25% 22 Missing ⚠️
server/models.py 11.11% 8 Missing ⚠️
server/services/email/smtp.py 90.32% 3 Missing ⚠️
server/views.py 0.00% 3 Missing ⚠️
server/services/email/templates/__init__.py 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   47.49%   49.79%   +2.29%     
==========================================
  Files          17       19       +2     
  Lines         878      964      +86     
==========================================
+ Hits          417      480      +63     
- Misses        461      484      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py261638%13, 17–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL94851845% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 11.218s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py261638%13, 17–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL94851845% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 19.131s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py28389%32–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95049448% 

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.400s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py28389%32–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95049448% 

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.631s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py28389%32–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95049448% 

Tests Skipped Failures Errors Time
10 0 💤 0 ❌ 0 🔥 0.472s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py281932%14–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95052145% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 15.225s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py281932%14–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95052145% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 15.837s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py281932%14–34
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95052145% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 12.873s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py30487%13, 35–37
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95247850% 

Tests Skipped Failures Errors Time
11 0 💤 0 ❌ 0 🔥 0.424s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py30487%13, 35–37
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95247850% 

Tests Skipped Failures Errors Time
11 0 💤 0 ❌ 0 🔥 0.405s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py302033%13, 17–37
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95252245% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 4.173s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py30487%13, 35–37
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95247850% 

Tests Skipped Failures Errors Time
11 0 💤 0 ❌ 0 🔥 0.536s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py302033%13, 17–37
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95252245% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 15.422s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py302033%13, 17–37
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95252245% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 26.428s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py46491%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py32488%15, 39–41
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95247850% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 5.500s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py46491%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22115032%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–335, 344, 349, 354, 362–363, 369, 374–378
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py251540%18–35, 39–53
   smtp.py322038%15, 19–41
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL95252245% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 3.375s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96553345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 3.347s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96548949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 0.498s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96553345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 2.362s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96553345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 2.873s ⏱️

@Reimirno Reimirno requested a review from cycomachead November 20, 2023 03:37

PHOTO_DIRECTORY = getenv('PHOTO_DIRECTORY', "placeholder")
PHOTO_DIRECTORY = getenv('PHOTO_DIRECTORY', "unset")

Choose a reason for hiding this comment

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

I wonder if it makes sense to use None for default values?

Copy link
Author

Choose a reason for hiding this comment

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

If we don't specify a default value it is already None.

The getenv helper I wrote will raise exception when the variable is None.

class ConfigBase(object):

    @staticmethod
    def getenv(key, default: Optional[str] = None):
        val = os.getenv(key, default)
        if val is None:
            raise EnvironmentalVariableMissingError(key)
        return val

Providing a non-None default value is a way to make this var optional.

But they are not really optional - if you want the email to be actually sent then you have to provide it.

But in DEV env then you don't want email to be sent. They don't need to be there.

Erhh sounds a bit messy. Maybe for the email env vars I should just put them into DevelopmentConfig

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96548949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 6.430s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96548949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 0.423s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96553345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 3.622s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96548949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 5.585s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96553345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 9.562s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py352334%12–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96553345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 3.514s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–24, 29–38, 43–55
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96448949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 5.436s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–24, 29–38, 43–55
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96448949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 6.467s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–24, 29–38, 43–55
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96453345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 2.700s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–24, 29–38, 43–55
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96448949% 

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 6.501s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–24, 29–38, 43–55
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96453345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 3.054s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162479%22, 25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–24, 29–38, 43–55
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96453345% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 3.135s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13285%17–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96448450% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 5.646s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13285%17–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96448450% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 6.696s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.10
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162380%25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96453245% 

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 17.524s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.11
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162380%25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96453245% 

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 18.118s ⏱️

Copy link

Coverage

Coverage for unit tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py42490%20–21, 46, 54
   forms.py48492%18–21
   models.py1162182%26, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13285%17–18
server/services/auth
   __init__.py30487%22, 50, 55–56
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py31390%15, 39–40
server/services/email/templates
   __init__.py27196%14
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96448450% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 6.756s ⏱️

Copy link

Coverage

Coverage for e2e tests for Python 3.12
FileStmtsMissCoverMissing
server
   __init__.py421076%12, 15–21, 26, 46, 54
   forms.py48492%18–21
   models.py1162380%25–28, 52, 55, 81, 85, 88–97, 100, 120–121, 127, 145, 164, 167, 181
   views.py22315232%29–34, 47–48, 66–84, 95–97, 106–113, 122, 134–136, 146–163, 177–194, 204–208, 217–219, 227–229, 236–247, 253–266, 272–289, 296, 301–303, 308–313, 318–326, 331–337, 346, 351, 356, 364–365, 371, 376–380
server/controllers
   __init__.py653743%25–52, 55, 66–86, 89
   auth_controllers.py382534%13–15, 21–47, 53–55
   dev_login_controllers.py342332%11–25, 30–39, 44–56
   health_controllers.py13746%8, 13–18
server/services/auth
   __init__.py30680%22, 50, 55–56, 61–62
server/services/canvas
   __init__.py462937%19–26, 30, 34, 38, 46–65, 69
   fake_canvas.py362433%7, 10, 13, 18–23, 26–27, 35–39, 42–49
server/services/core
   assign.py292610%14–62
   data.py11110010%12–40, 44–92, 96, 100–113, 117–141
server/services/email
   __init__.py352529%18–46, 50–68
   smtp.py311939%15, 19–40
server/services/email/templates
   __init__.py271833%9–11, 14, 24–34, 38–40
server/typings
   exception.py15473%13–14, 23, 26
TOTAL96453245% 

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 26.423s ⏱️

@Reimirno Reimirno merged commit d9cc7e3 into main Nov 28, 2023
16 checks passed
@Reimirno Reimirno deleted the send-email branch November 28, 2023 23:18
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