MCPcopy
hub / github.com/scrapy/scrapy / test_bad_credentials

Method test_bad_credentials

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

Source from the content-addressed store, hash-verified

25
26 @inline_callbacks_test
27 def test_bad_credentials(self):
28 console, portal = self._get_console_and_portal()
29 creds = credentials.UsernamePassword(b"username", b"password")
30 d = portal.login(creds, None, ITelnetProtocol)
31 with pytest.raises(ValueError, match="Invalid credentials"):
32 yield d
33 console.stop_listening()
34
35 @inline_callbacks_test
36 def test_good_credentials(self):

Callers

nothing calls this directly

Calls 3

loginMethod · 0.80
stop_listeningMethod · 0.80

Tested by

no test coverage detected