| 34 | |
| 35 | |
| 36 | class FakeUIHost: |
| 37 | def __init__(self, *, pick=None): |
| 38 | self._pick = pick |
| 39 | self.select_calls: list[dict] = [] |
| 40 | |
| 41 | async def select(self, title, options, *, current=None): |
| 42 | self.select_calls.append( |
| 43 | { |
| 44 | "title": title, |
| 45 | "values": [o.value for o in options], |
| 46 | "labels": [o.label for o in options], |
| 47 | "descriptions": [o.description for o in options], |
| 48 | } |
| 49 | ) |
| 50 | return self._pick |
| 51 | |
| 52 | async def prompt_text(self, title, *, default="", placeholder=None): |
| 53 | return None |
| 54 | |
| 55 | async def display(self, title, body): |
| 56 | return None |
| 57 | |
| 58 | |
| 59 | @pytest.fixture |
no outgoing calls