def test_list_or_show_create_tables():
    suggestions = suggest_type('\\dt+', '\\dt+ ')
    assert sorted_dicts(suggestions) == sorted_dicts([{
        'type': 'table',
        'schema': []
    }, {
        'type': 'view',
        'schema': []
    }, {
        'type': 'schema'
    }])
def test_describe_table():
    suggestions = suggest_type('\\dt', '\\dt ')
    assert sorted_dicts(suggestions) == sorted_dicts([{
        'type': 'table',
        'schema': []
    }, {
        'type': 'view',
        'schema': []
    }, {
        'type': 'schema'
    }])
Exemplo n.º 3
0
def test_list_or_show_create_tables():
    suggestions = suggest_type("\\dt+", "\\dt+ ")
    assert sorted_dicts(suggestions) == sorted_dicts([
        {
            "type": "table",
            "schema": []
        },
        {
            "type": "view",
            "schema": []
        },
        {
            "type": "schema"
        },
    ])
Exemplo n.º 4
0
def test_describe_table():
    suggestions = suggest_type("\\dt", "\\dt ")
    assert sorted_dicts(suggestions) == sorted_dicts([
        {
            "type": "table",
            "schema": []
        },
        {
            "type": "view",
            "schema": []
        },
        {
            "type": "schema"
        },
    ])
Exemplo n.º 5
0
def test_u_suggests_databases():
    suggestions = suggest_type('\u ', '\u ')
    assert sorted_dicts(suggestions) == sorted_dicts([{'type': 'database'}])
Exemplo n.º 6
0
def test_u_suggests_databases():
    suggestions = suggest_type('\\u ', '\\u ')
    assert sorted_dicts(suggestions) == sorted_dicts([
        {'type': 'database'}])
Exemplo n.º 7
0
def test_list_or_show_create_tables():
    suggestions = suggest_type('\\dt+', '\\dt+ ')
    assert sorted_dicts(suggestions) == sorted_dicts([
        {'type': 'table', 'schema': []},
        {'type': 'view', 'schema': []},
        {'type': 'schema'}])
Exemplo n.º 8
0
def test_describe_table():
    suggestions = suggest_type('\\dt', '\\dt ')
    assert sorted_dicts(suggestions) == sorted_dicts([
        {'type': 'table', 'schema': []},
        {'type': 'view', 'schema': []},
        {'type': 'schema'}])
Exemplo n.º 9
0
def test_u_suggests_databases():
    suggestions = suggest_type("\\u ", "\\u ")
    assert sorted_dicts(suggestions) == sorted_dicts([{"type": "database"}])