forked from openlp/openlp
Fixed Tests
This commit is contained in:
parent
6a3982bab9
commit
f031df3637
@ -85,7 +85,7 @@ class ListWidgetWithDnD(QtWidgets.QListWidget):
|
|||||||
"""
|
"""
|
||||||
if event.mimeData().hasUrls():
|
if event.mimeData().hasUrls():
|
||||||
event.accept()
|
event.accept()
|
||||||
else:
|
else:
|
||||||
event.ignore()
|
event.ignore()
|
||||||
|
|
||||||
def dragMoveEvent(self, event):
|
def dragMoveEvent(self, event):
|
||||||
|
@ -24,7 +24,8 @@ This module contains tests for the openlp.core.lib.listwidgetwithdnd module
|
|||||||
"""
|
"""
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from openlp.core.ui.lib.listwidgetwithdnd import ListWidgetWithDnD, NO_RESULTS, SHORT_RESULTS
|
from openlp.core.common.uistrings import UiStrings
|
||||||
|
from openlp.core.ui.lib.listwidgetwithdnd import ListWidgetWithDnD
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ class TestListWidgetWithDnD(TestCase):
|
|||||||
widget.clear()
|
widget.clear()
|
||||||
|
|
||||||
# THEN: The results text should be the standard 'no results' text.
|
# THEN: The results text should be the standard 'no results' text.
|
||||||
self.assertEqual(widget.no_results_text, NO_RESULTS)
|
self.assertEqual(widget.no_results_text, UiStrings().NoResults)
|
||||||
|
|
||||||
def test_clear_search_while_typing(self):
|
def test_clear_search_while_typing(self):
|
||||||
"""
|
"""
|
||||||
@ -56,7 +57,7 @@ class TestListWidgetWithDnD(TestCase):
|
|||||||
widget.clear(search_while_typing=True)
|
widget.clear(search_while_typing=True)
|
||||||
|
|
||||||
# THEN: The results text should be the 'short results' text.
|
# THEN: The results text should be the 'short results' text.
|
||||||
self.assertEqual(widget.no_results_text, SHORT_RESULTS)
|
self.assertEqual(widget.no_results_text, UiStrings().ShortResults)
|
||||||
|
|
||||||
def test_paint_event(self):
|
def test_paint_event(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user