'Test for ensuring that an error is raised for operating on a nonexisting udt or an invalid keyspace'

def test_raise_error_on_nonexisting_udts(self):

    c = Cluster(protocol_version=PROTOCOL_VERSION)
    s = c.connect(self.keyspace_name, wait_for_all_pools=True)
    User = namedtuple('user', ('age', 'name'))
    with self.assertRaises(UserTypeDoesNotExist):
        c.register_user_type('some_bad_keyspace', 'user', User)
    with self.assertRaises(UserTypeDoesNotExist):
        c.register_user_type('system', 'user', User)
    with self.assertRaises(InvalidRequest):
        s.execute('CREATE    TABLE    mytable    (a    int    PRIMARY    KEY,    b    frozen<user>)')
    c.shutdown()
