'Checks HQL generation for create table.
NOT TESTED/DONE: Validation checks for the inputs.'

def test_create_table_generation(self):

    resp = self.client.get(('/beeswax/create/create_table/%s' % self.db_name))
    assert_true(('Field    terminator' in resp.content))
    resp = self.client.post(('/beeswax/create/create_table/%s' % self.db_name), {'table-name': 'my_table', 'table-comment': 'Yo>>>>dude', 'table-row_format': 'Delimited', 'table-field_terminator_0': ',', 'table-collection_terminator_0': '\\002', 'table-map_key_terminator_0': '\\003', 'table-file_format': 'TextFile', 'table-use_default_location': 'False', 'table-skip_header': 'False', 'table-external_location': '/tmp/foo', 'columns-0-column_name': 'my_col', 'columns-0-column_type': 'string', 'columns-0-_exists': 'True', 'columns-next_form_id': '1', 'partitions-next_form_id': '0', 'create': 'Create    table'}, follow=True)
    response = self.client.get(('/metastore/table/%s/my_table?format=json' % self.db_name))
    data = json.loads(response.content)
    assert_true(('my_col' in [col['name'] for col in data['cols']]), data)
