twisted.conch.test.test_knownhosts.EntryTestsMixin
class documentationtwisted.conch.test.test_knownhosts
(View In Hierarchy)
Known subclasses: twisted.conch.test.test_knownhosts.HashedEntryTests, twisted.conch.test.test_knownhosts.PlainEntryTests, twisted.conch.test.test_knownhosts.UnparsedEntryTests
Tests for implementations of IKnownHostEntry
.
Subclasses must set the 'entry' attribute to a provider of that interface,
the implementation of that interface under test.
Instance Variable | entry | a provider of IKnownHostEntry
with a hostname of www.twistedmatrix.com and an RSA key of sampleKey. |
Method | test_providesInterface | The given entry should provide IKnownHostEntry. |
Method | test_fromString | No summary |
Method | test_matchesKey | IKnownHostEntry.matchesKey
checks to see if an entry matches a given SSH key. |
Method | test_matchesHost | IKnownHostEntry.matchesHost
checks to see if an entry matches a given hostname. |
IKnownHostEntry
with a hostname of www.twistedmatrix.com and an RSA key of sampleKey.
Constructing a plain text entry from an unhashed known_hosts entry will
result in an IKnownHostEntry
provider with 'keyString', 'hostname', and 'keyType' attributes. While
outside the interface in question, these attributes are held in common by
PlainEntry
and HashedEntry
implementations; other implementations should override this method in
subclasses.
IKnownHostEntry.matchesKey
checks to see if an entry matches a given SSH key.
IKnownHostEntry.matchesHost
checks to see if an entry matches a given hostname.