-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas Fernandes Vieira
committed
Jan 5, 2019
1 parent
c510e92
commit 3cce278
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import unittest | ||
|
||
import _email | ||
import _log | ||
|
||
class TestEmail(unittest.TestCase): | ||
def setUp(self): | ||
pass | ||
|
||
def test_init(self): | ||
email = _email.Email() | ||
self.assertEqual(email.message, "") | ||
|
||
def test_send(self): | ||
email = _email.Email() | ||
log = _log.Log("Tests/Temp") | ||
self.assertFalse(email.send("#####@gmail.com", "strong and complicated password", "#####@gmail.com", log)) | ||
self.assertTrue(log.error_occurred) | ||
|
||
def test_append_message(self): | ||
email = _email.Email() | ||
email.append_message("test") | ||
self.assertEqual(email.message, "test") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters