Fix unit tests after refactoring

This commit is contained in:
Florian Bruhin 2018-03-19 09:53:35 +01:00
parent a4530797ea
commit 232fd19422
2 changed files with 4 additions and 5 deletions

View File

@ -40,9 +40,7 @@ def test_big_cache_size(config_stub):
"""Make sure a too big cache size is handled correctly."""
config_stub.val.content.cache.size = 2 ** 63 - 1
profile = webenginesettings.default_profile
webenginesettings._set_http_cache_size(profile)
profile.setter.set_http_cache_size()
assert profile.httpCacheMaximumSize() == 2 ** 31 - 1

View File

@ -56,8 +56,9 @@ class StylesheetTester:
"""Initialize the stylesheet with a provided css file."""
css_path = os.path.join(os.path.dirname(__file__), css_file)
self.config_stub.val.content.user_stylesheets = css_path
p = QWebEngineProfile.defaultProfile()
webenginesettings._init_stylesheet(p)
profile = QWebEngineProfile.defaultProfile()
setter = webenginesettings.ProfileSetter(profile)
setter.init_stylesheet()
def set_css(self, css):
"""Set document style to `css` via stylesheet.js."""