def test_basics(self, config_stub, monkeypatch, settings, new_qt, expected): for k, v in settings.items(): config_stub.set_obj('colors.webpage.darkmode.' + k, v) monkeypatch.setattr(configinit.qtutils, 'version_check', lambda version, exact=False, compiled=True: new_qt) assert list(configinit._darkmode_settings()) == expected
def test_customization(self, config_stub, monkeypatch, setting, value, exp_key, exp_val): config_stub.val.colors.webpage.darkmode.enabled = True config_stub.set_obj('colors.webpage.darkmode.' + setting, value) monkeypatch.setattr(configinit.qtutils, 'version_check', lambda version, exact=False, compiled=True: True) expected = [('darkModeEnabled', 'true'), (exp_key, exp_val)] assert list(configinit._darkmode_settings()) == expected