Adding upstream version 1.24.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d7573acbf5
commit
fc52eb2608
14 changed files with 141 additions and 112 deletions
|
@ -393,6 +393,17 @@ def test_join_using_suggests_common_columns(col_list):
|
|||
'tables': [(None, 'abc', None), (None, 'def', None)],
|
||||
'drop_unique': True}]
|
||||
|
||||
@pytest.mark.parametrize('sql', [
|
||||
'SELECT * FROM abc a JOIN def d ON a.id = d.id JOIN ghi g ON g.',
|
||||
'SELECT * FROM abc a JOIN def d ON a.id = d.id AND a.id2 = d.id2 JOIN ghi g ON d.id = g.id AND g.',
|
||||
])
|
||||
def test_two_join_alias_dot_suggests_cols1(sql):
|
||||
suggestions = suggest_type(sql, sql)
|
||||
assert sorted_dicts(suggestions) == sorted_dicts([
|
||||
{'type': 'column', 'tables': [(None, 'ghi', 'g')]},
|
||||
{'type': 'table', 'schema': 'g'},
|
||||
{'type': 'view', 'schema': 'g'},
|
||||
{'type': 'function', 'schema': 'g'}])
|
||||
|
||||
def test_2_statements_2nd_current():
|
||||
suggestions = suggest_type('select * from a; select * from ',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import time
|
||||
import pytest
|
||||
from mock import Mock, patch
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -11,7 +11,7 @@ def completer():
|
|||
|
||||
@pytest.fixture
|
||||
def complete_event():
|
||||
from mock import Mock
|
||||
from unittest.mock import Mock
|
||||
return Mock()
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import pytest
|
||||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
from prompt_toolkit.completion import Completion
|
||||
from prompt_toolkit.document import Document
|
||||
import mycli.packages.special.main as special
|
||||
|
@ -35,7 +35,7 @@ def completer():
|
|||
|
||||
@pytest.fixture
|
||||
def complete_event():
|
||||
from mock import Mock
|
||||
from unittest.mock import Mock
|
||||
return Mock()
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import stat
|
||||
import tempfile
|
||||
from time import time
|
||||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from pymysql import ProgrammingError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue