mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-06 14:13:28 -06:00
uitests: test xmleditor textview fallback
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
8eb37c0e50
commit
95ca39aae8
@ -1,6 +1,8 @@
|
||||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
import unittest
|
||||
|
||||
import tests.utils
|
||||
from . import lib
|
||||
|
||||
@ -799,6 +801,21 @@ def testDetailsXMLEdit(app):
|
||||
lib.utils.test_xmleditor_interactions(app, win, finish)
|
||||
|
||||
|
||||
@unittest.mock.patch.dict('os.environ',
|
||||
{"VIRTINST_TEST_SUITE_FAKE_NO_SOURCEVIEW": "1"})
|
||||
def testDetailsXMLEditorSourceviewFallback(app):
|
||||
"""
|
||||
Test XML editor standard bits, when falling back to gtk textview
|
||||
"""
|
||||
app.open(xmleditor_enabled=True)
|
||||
win = app.manager_open_details("test-clone-simple")
|
||||
finish = win.find("config-apply")
|
||||
xmleditor = win.find("XML editor")
|
||||
|
||||
# Do standard xmleditor tests
|
||||
lib.utils.test_xmleditor_interactions(app, win, finish)
|
||||
|
||||
|
||||
def testDetailsConsoleChecksSSH(app):
|
||||
"""
|
||||
Trigger a bunch of console connection failures to hit
|
||||
|
@ -2,6 +2,8 @@
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
# pylint: disable=wrong-import-order,ungrouped-imports
|
||||
import os
|
||||
|
||||
import gi
|
||||
|
||||
from virtinst import log
|
||||
@ -19,6 +21,10 @@ except ValueError: # pragma: no cover
|
||||
log.debug("Not using GtkSource")
|
||||
have_gtksourceview = False
|
||||
|
||||
if "VIRTINST_TEST_SUITE_FAKE_NO_SOURCEVIEW" in os.environ:
|
||||
log.debug("Faking missing GtkSource for test suite")
|
||||
have_gtksourceview = False
|
||||
|
||||
if have_gtksourceview:
|
||||
from gi.repository import GtkSource
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user