mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
This commit is contained in:
1 parent
a9ae5f59b5
commit
a6282e4401
1 file changed
+5
@@ -1,3 +1,5 @@
|
|||||||
|
import pytest
|
||||||
|
|
||||||
from dzgui.api.servers import Details
|
from dzgui.api.servers import Details
|
||||||
from dzgui.views.dialogs.servers import ServerDetailsDialog
|
from dzgui.views.dialogs.servers import ServerDetailsDialog
|
||||||
|
|
||||||
@@ -21,6 +23,7 @@ class MockController:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
|
||||||
def test_html_escaping() -> None:
|
def test_html_escaping() -> None:
|
||||||
name = "Test server"
|
name = "Test server"
|
||||||
desc = "<Server description> Game & mods"
|
desc = "<Server description> Game & mods"
|
||||||
@@ -31,5 +34,7 @@ def test_html_escaping() -> None:
|
|||||||
controller = MockController()
|
controller = MockController()
|
||||||
dialog = ServerDetailsDialog(controller, details)
|
dialog = ServerDetailsDialog(controller, details)
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
while Gtk.events_pending():
|
||||||
|
Gtk.main_iteration()
|
||||||
|
|
||||||
assert dialog.description.get_text() == desc
|
assert dialog.description.get_text() == desc
|
||||||
Reference in new issue
Block a user