summaryrefslogtreecommitdiff
path: root/tests/unit/browser/test_history.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-05 11:35:13 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-05 18:32:29 +0100
commit2ab12af3e1ae9d9ee76e8ac8aff7a570fd9e8526 (patch)
tree49092d8de38b0c668b308605a58b366c65030bf0 /tests/unit/browser/test_history.py
parent4361009546f6f39862cd0ea7d539b55746586a83 (diff)
downloadqutebrowser-2ab12af3e1ae9d9ee76e8ac8aff7a570fd9e8526.tar.gz
qutebrowser-2ab12af3e1ae9d9ee76e8ac8aff7a570fd9e8526.zip
history: Refactor early excludes
Move the check to a method and move some end2end to unit tests.
Diffstat (limited to 'tests/unit/browser/test_history.py')
-rw-r--r--tests/unit/browser/test_history.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/browser/test_history.py b/tests/unit/browser/test_history.py
index cac167028..8f3a487fd 100644
--- a/tests/unit/browser/test_history.py
+++ b/tests/unit/browser/test_history.py
@@ -210,9 +210,17 @@ class TestAdd:
(logging.DEBUG, 'a.com', 'b.com', [('a.com', 'title', 12345, False),
('b.com', 'title', 12345, True)]),
(logging.WARNING, 'a.com', '', [('a.com', 'title', 12345, False)]),
+
(logging.WARNING, '', '', []),
+
(logging.WARNING, 'data:foo', '', []),
(logging.WARNING, 'a.com', 'data:foo', []),
+
+ (logging.WARNING, 'view-source:foo', '', []),
+ (logging.WARNING, 'a.com', 'view-source:foo', []),
+
+ (logging.WARNING, 'qute://back', '', []),
+ (logging.WARNING, 'a.com', 'qute://back', []),
])
def test_from_tab(self, web_history, caplog, mock_time,
level, url, req_url, expected):