MCPcopy
hub / github.com/scrapy/scrapy / test_custom_credentials

Method test_custom_credentials

tests/test_extension_telnet.py:46–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44
45 @inline_callbacks_test
46 def test_custom_credentials(self):
47 settings = {
48 "TELNETCONSOLE_USERNAME": "user",
49 "TELNETCONSOLE_PASSWORD": "pass",
50 }
51 console, portal = self._get_console_and_portal(settings=settings)
52 creds = credentials.UsernamePassword(b"user", b"pass")
53 d = portal.login(creds, None, ITelnetProtocol)
54 yield d
55 console.stop_listening()

Callers

nothing calls this directly

Calls 3

loginMethod · 0.80
stop_listeningMethod · 0.80

Tested by

no test coverage detected