Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_menu_queue_init():
mymenu = QueueMenu(window, source)
assert isinstance(mymenu, QueueMenu)
def test_menu_queue_init():
mymenu = QueueMenu(window, source)
assert isinstance(mymenu, QueueMenu)
def test_menu_queue_update_items():
mymenu = QueueMenu(window, source)
mymenu.update_items(None)
assert len(mymenu._items) == 2
def test_menu_queue_items(mock_A_NORMAL):
mymenu = QueueMenu(window, source)
mymenu.update_items(feed)
items = mymenu._items
assert {
'attr': mock_A_NORMAL,
'tags': [],
'text': str(player1)
} in items
def test_menu_queue_update_child():
mymenu = QueueMenu(window, source)
mymenu.update_items(feed)
items = mymenu._items
mymenu.update_child()
assert mymenu._items == items
def test_menu_queue_item_none():
mymenu = QueueMenu(window, source)
assert mymenu.item == source.__getitem__()
def test_menu_queue_metadata():
mymenu = QueueMenu(window, source)
mymenu.update_items(feed)
assert mymenu.metadata == player1.episode.metadata
def create_menus(self) -> None:
"""Create the menus used in each window.
Overrides method from Perspective; see documentation in that class.
"""
assert self._queue_window is not None
self._queue_menu = QueueMenu(self._queue_window, self._display.queue,
active=True)