def default_profile(monkeypatch): """A profile to use which is set as default_profile. Note we use a "private" profile here to avoid actually storing data during tests. """ profile = QtWebEngineWidgets.QWebEngineProfile() profile.setter = webenginesettings.ProfileSetter(profile) monkeypatch.setattr(webenginesettings, 'default_profile', profile) return profile
def private_profile(monkeypatch): """A profile to use which is set as private_profile.""" profile = QtWebEngineWidgets.QWebEngineProfile() profile.setter = webenginesettings.ProfileSetter(profile) monkeypatch.setattr(webenginesettings, 'private_profile', profile) return profile