'Test that the _guessStringType method guesses string types
correctly.'

def test__guessStringType(self):

    self.assertEqual(keys.Key._guessStringType(keydata.publicRSA_openssh), 'public_openssh')
    self.assertEqual(keys.Key._guessStringType(keydata.publicDSA_openssh), 'public_openssh')
    self.assertEqual(keys.Key._guessStringType(keydata.publicECDSA_openssh), 'public_openssh')
    self.assertEqual(keys.Key._guessStringType(keydata.privateRSA_openssh), 'private_openssh')
    self.assertEqual(keys.Key._guessStringType(keydata.privateDSA_openssh), 'private_openssh')
    self.assertEqual(keys.Key._guessStringType(keydata.privateECDSA_openssh), 'private_openssh')
    self.assertEqual(keys.Key._guessStringType(keydata.publicRSA_lsh), 'public_lsh')
    self.assertEqual(keys.Key._guessStringType(keydata.publicDSA_lsh), 'public_lsh')
    self.assertEqual(keys.Key._guessStringType(keydata.privateRSA_lsh), 'private_lsh')
    self.assertEqual(keys.Key._guessStringType(keydata.privateDSA_lsh), 'private_lsh')
    self.assertEqual(keys.Key._guessStringType(keydata.privateRSA_agentv3), 'agentv3')
    self.assertEqual(keys.Key._guessStringType(keydata.privateDSA_agentv3), 'agentv3')
    self.assertEqual(keys.Key._guessStringType('\x00\x00\x00\x07ssh-rsa\x00\x00\x00\x01\x01'), 'blob')
    self.assertEqual(keys.Key._guessStringType('\x00\x00\x00\x07ssh-dss\x00\x00\x00\x01\x01'), 'blob')
    self.assertEqual(keys.Key._guessStringType('not    a    key'), None)
