diff --git a/mayan/apps/sources/models/email_sources.py b/mayan/apps/sources/models/email_sources.py index a681c7f721..57435e201e 100644 --- a/mayan/apps/sources/models/email_sources.py +++ b/mayan/apps/sources/models/email_sources.py @@ -284,8 +284,8 @@ class POP3Email(EmailBaseModel): ) mailbox.getwelcome() - mailbox.user(username=self.username) - mailbox.pass_(password=self.password) + mailbox.user(self.username) + mailbox.pass_(self.password) messages_info = mailbox.list() logger.debug(msg='messages_info:') diff --git a/mayan/apps/sources/tests/test_models.py b/mayan/apps/sources/tests/test_models.py index 16a6282118..ab5faa913c 100644 --- a/mayan/apps/sources/tests/test_models.py +++ b/mayan/apps/sources/tests/test_models.py @@ -203,7 +203,10 @@ class POP3SourceTestCase(GenericDocumentTestCase): def list(self, which=None): return (None, ['1 test']) - def pass_(self, password): + def user(self, user): + return + + def pass_(self, pswd): return def quit(self): @@ -214,9 +217,6 @@ class POP3SourceTestCase(GenericDocumentTestCase): 1, [TEST_EMAIL_BASE64_FILENAME] ) - def user(self, username): - return - @mock.patch('poplib.POP3_SSL', autospec=True) def test_download_document(self, mock_poplib): mock_poplib.return_value = POP3SourceTestCase.MockMailbox()