Skip to content

Commit

Permalink
Resolved PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gene Lee committed Jul 29, 2019
1 parent d37fcc2 commit eff673f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def unit_test():
utility.exec_command(
'pytest --cov mssqlcli '
'tests/test_mssqlcliclient.py '
'tests/test_completion_refresher.py ',
'tests/test_main.py '
'tests/test_fuzzy_completion.py '
'tests/test_rowlimit.py '
Expand Down
6 changes: 3 additions & 3 deletions mssqlcli/completion_refresher.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ def wrapper(wrapped):
return wrapper


@refresher('schemata')
@refresher('schemas')
@decorators.suppress_all_exceptions()
def refresh_schemata(completer, mssqlcliclient):
completer.extend_schemata(mssqlcliclient.get_schemas())
def refresh_schemas(completer, mssqlcliclient):
completer.extend_schemas(mssqlcliclient.get_schemas())


@refresher('tables')
Expand Down
4 changes: 2 additions & 2 deletions tests/test_completion_refresher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_ctor(self):
refresher = CompletionRefresher()
assert len(refresher.refreshers) > 0
actual_handlers = set(refresher.refreshers.keys())
expected_handlers = set(['databases', 'schemata', 'tables', 'types', 'views'])
expected_handlers = set(['databases', 'schemas', 'tables', 'types', 'views'])
assert expected_handlers == actual_handlers

def test_refresh_called_once(self):
Expand Down Expand Up @@ -74,7 +74,7 @@ def connect_to_database(self):
mssqlcliclient = MssqlCliClientMock()
callbacks = [Mock()]
refresher = CompletionRefresher()

# Set refreshers to 0: we're not testing refresh logic here
refresher.refreshers = {}
refresher.refresh(mssqlcliclient, callbacks)
Expand Down

0 comments on commit eff673f

Please sign in to comment.