Ensure qute:javascript throws QuteSchemeOSError on 404.

This commit is contained in:
Imran Sobir 2017-03-09 22:07:55 +05:00
parent 50bca33618
commit a1bec12b2e

View File

@ -58,11 +58,11 @@ class TestJavascriptHandler:
assert data == content
def test_qutejavascript_error(self):
def test_qutejavascript_404(self):
url = QUrl("qute://javascript/404.js")
with pytest.raises(OSError):
qutescheme.qute_javascript(url)
with pytest.raises(qutescheme.QuteSchemeOSError):
qutescheme.data_for_url(url)
def test_qutejavascript_empty_query(self):
url = QUrl("qute://javascript")