MCPcopy
hub / github.com/scrapy/scrapy / test_create_sender_factory_with_host

Method test_create_sender_factory_with_host

tests/test_mail.py:156–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

154 assert attach.get_payload(decode=True).decode("utf-8") == body
155
156 def test_create_sender_factory_with_host(self):
157 mailsender = MailSender(debug=False, smtphost="smtp.testhost.com")
158
159 factory = mailsender._create_sender_factory(
160 to_addrs=["test@scrapy.org"], msg="test", d=defer.Deferred()
161 )
162
163 context = factory.buildProtocol("test@scrapy.org").context
164 assert isinstance(context, ClientTLSOptions)

Callers

nothing calls this directly

Calls 3

MailSenderClass · 0.90
buildProtocolMethod · 0.80

Tested by

no test coverage detected