Skip to content

Testing the SMTP hook fails due to invalid check #66391

Description

@omacchioni

In function def test_connection(self) -> tuple[bool, str]::

status = smtp_client.noop()
if status == 250:
return True, "Connection successfully tested"

If I'm not mistaken, noop returns a tuple with (status_code, message) like this:

(250, b'2.0.0 Ok')

This is more or less documented in https://docs.python.org/3/library/smtplib.html

The test fails because it's only considering an int as a return value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions