diff options
| author | Barry Warsaw | 2015-06-22 18:39:45 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-06-22 18:39:45 -0400 |
| commit | 01c85a2acddf0e6a1a95262e2dc2f79e3c3f9e75 (patch) | |
| tree | 5f887259b530d8ec63701adacda32e8ece69cb9c /src/mailman/mta/tests/test_connection.py | |
| parent | fd29c455148ddfdabdbbf1bd8cd7b4d3927b3ddf (diff) | |
| download | mailman-01c85a2acddf0e6a1a95262e2dc2f79e3c3f9e75.tar.gz mailman-01c85a2acddf0e6a1a95262e2dc2f79e3c3f9e75.tar.zst mailman-01c85a2acddf0e6a1a95262e2dc2f79e3c3f9e75.zip | |
Port to Python 3.5.
Diffstat (limited to 'src/mailman/mta/tests/test_connection.py')
| -rw-r--r-- | src/mailman/mta/tests/test_connection.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mailman/mta/tests/test_connection.py b/src/mailman/mta/tests/test_connection.py index 6e167497e..a3a830330 100644 --- a/src/mailman/mta/tests/test_connection.py +++ b/src/mailman/mta/tests/test_connection.py @@ -49,3 +49,17 @@ Subject: aardvarks """) self.assertEqual(cm.exception.smtp_code, 571) self.assertEqual(cm.exception.smtp_error, b'Bad authentication') + + def test_authentication_good_path(self): + # Logging in with the correct user name and password succeeds. + connection = Connection( + config.mta.smtp_host, int(config.mta.smtp_port), 0, + 'testuser', 'testpass') + connection.sendmail('anne@example.com', ['bart@example.com'], """\ +From: anne@example.com +To: bart@example.com +Subject: aardvarks + +""") + self.assertEqual(self.layer.smtpd.get_authentication_credentials(), + 'AHRlc3R1c2VyAHRlc3RwYXNz') |
