'Test that the type method returns the correct type for an object.'

def test_type(self):

    self.assertEqual(keys.Key(self.rsaObj).type(), 'RSA')
    self.assertEqual(keys.Key(self.rsaObj).sshType(), 'ssh-rsa')
    self.assertEqual(keys.Key(self.dsaObj).type(), 'DSA')
    self.assertEqual(keys.Key(self.dsaObj).sshType(), 'ssh-dss')
    self.assertEqual(keys.Key(self.ecObj).type(), 'EC')
    self.assertEqual(keys.Key(self.ecObj).sshType(), keydata.ECDatanistp256['curve'])
    self.assertRaises(RuntimeError, keys.Key(None).type)
    self.assertRaises(RuntimeError, keys.Key(None).sshType)
    self.assertRaises(RuntimeError, keys.Key(self).type)
    self.assertRaises(RuntimeError, keys.Key(self).sshType)
