Fix unit tests

This commit is contained in:
Rebecca Breu 2024-02-27 21:43:16 +01:00
parent 2a9487a5e9
commit 69dc401d0b
2 changed files with 1 additions and 18 deletions

View file

@ -16,7 +16,7 @@
from functools import partial
import logging
from PyQt6 import QtWidgets, QtCore, QtGui
from PyQt6 import QtWidgets, QtCore
from beeref import constants
from beeref.actions.actions import actions

View file

@ -437,16 +437,6 @@ def test_flags_shortcut_column():
Action({'id': 'baz', 'text': 'Baz'})]))
def test_keyboard_shortcuts_proxy_data_unfiltered():
proxy = KeyboardShortcutsProxy()
color1 = proxy.data(
proxy.index(0, 0), QtCore.Qt.ItemDataRole.BackgroundRole)
color2 = proxy.data(
proxy.index(1, 0), QtCore.Qt.ItemDataRole.BackgroundRole)
color3 = proxy.data(
proxy.index(2, 0), QtCore.Qt.ItemDataRole.BackgroundRole)
assert color1 == color3
assert color1 != color2
assert proxy.data(
proxy.index(0, 0), QtCore.Qt.ItemDataRole.DisplayRole) == 'Bar'
assert proxy.data(
@ -462,13 +452,6 @@ def test_keyboard_shortcuts_proxy_data_unfiltered():
def test_keyboard_shortcuts_proxy_data_filtered():
proxy = KeyboardShortcutsProxy()
proxy.setFilterFixedString('b')
color1 = proxy.data(
proxy.index(0, 0), QtCore.Qt.ItemDataRole.BackgroundRole)
color2 = proxy.data(
proxy.index(1, 0), QtCore.Qt.ItemDataRole.BackgroundRole)
assert color1 != color2
assert proxy.data(
proxy.index(0, 0), QtCore.Qt.ItemDataRole.DisplayRole) == 'Bar'
assert proxy.data(