'L{keys.Key.toString} raises L{keys.BadKeyError} when passed an invalid
format type.'

def test_toStringErrors(self):

    self.assertRaises(keys.BadKeyError, keys.Key(self.rsaObj).toString, 'bad_type')
