forked from AG_QGIS/Plugin_SN_Basis
Wrappe modular aufgebaut, Tests erfolgreich, Menüleiste und Werzeugleiste werden eingetragen (QT6 und QT5)- (Es fehlen noch Fachplugins, um zu prüfen, ob es auch wirklich in QGIS geht)
This commit is contained in:
@@ -11,7 +11,7 @@ class TestSettingsLogic(unittest.TestCase):
|
||||
# -----------------------------------------------------
|
||||
# Test: load() liest alle Variablen über get_variable()
|
||||
# -----------------------------------------------------
|
||||
@patch("sn_basis.functions.qgisqt_wrapper.get_variable")
|
||||
@patch("sn_basis.functions.settings_logic.get_variable")
|
||||
def test_load(self, mock_get):
|
||||
# Mock-Rückgabe für jede Variable
|
||||
mock_get.side_effect = lambda key, scope="project": f"wert_{key}"
|
||||
@@ -30,7 +30,7 @@ class TestSettingsLogic(unittest.TestCase):
|
||||
# -----------------------------------------------------
|
||||
# Test: save() ruft set_variable() nur für bekannte Keys auf
|
||||
# -----------------------------------------------------
|
||||
@patch("sn_basis.functions.qgisqt_wrapper.set_variable")
|
||||
@patch("sn_basis.functions.settings_logic.set_variable")
|
||||
def test_save(self, mock_set):
|
||||
logic = SettingsLogic()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user