Skip to content

Commit 1780d53

Browse files
committed
mock qualified_name
1 parent 927663c commit 1780d53

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/unit/test_results_copy_markup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from __future__ import annotations
1111

12+
from types import SimpleNamespace
1213
from typing import Any
1314

1415
import pytest
@@ -86,6 +87,7 @@ def test_copy_cell_preserves_literal_brackets_when_not_rendering_markup() -> Non
8687
app.action_copy_cell()
8788
assert app.clipboard_text == "[bold]hello"
8889

90+
8991
class _FakeQueryInput:
9092
def __init__(self) -> None:
9193
self.text = ""
@@ -102,6 +104,9 @@ def __init__(self, cells: list[tuple[str, ...]], columns: list[str]) -> None:
102104
self._columns = columns
103105
self.query_input = _FakeQueryInput()
104106
self._suppress_autocomplete_once = False
107+
self.current_provider = SimpleNamespace(
108+
dialect=SimpleNamespace(qualified_name=lambda database, schema, name: name),
109+
)
105110

106111
def _get_active_results_context(self) -> tuple[Any, list, list, bool]:
107112
return self._table, self._columns, [], False

0 commit comments

Comments
 (0)