AIVPN icon indicating copy to clipboard operation
AIVPN copied to clipboard

Add unit test for AI VPN module: mod_comm_send

Open Adity20 opened this issue 11 months ago • 2 comments

Pull request type

Please check the type of change your PR introduces:

  • [ ] Feature

What is the current behavior?

Closes #57

What is the new behavior?

  • This test suite verifies that the send_mime_msg_via_email function correctly sends an email with the appropriate subject and attachment when given a specific task (msg_task).
  • It mocks the SMTP server interactions to simulate sending an email without actually sending one
  • Currently the test is including only the minimal testing of the functions but later on the scope of tests will increase to edge cases, validating the email and much more.

Other information

This is for the module mod_comm_send. Run python -u tests/test_mod_comm_send.py

Adity20 avatar Mar 23 '24 15:03 Adity20

@Adity20 thanks! 🤘🏻

  • Please move the test to a tests folder
  • Please move the file to a file that respects the naming convention, in this case tests/test_mod_comm_send.py
  • Please include one sentence with the aim of the test, what functionality are you testing.
  • Please include the command you used to run the test, so we can make sure we use the same

verovaleros avatar Mar 27 '24 16:03 verovaleros

Yeah I am on it @verovaleros.

Adity20 avatar Mar 27 '24 16:03 Adity20