summaryrefslogtreecommitdiff
path: root/tests/unit/completion/test_models.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-07-29 20:34:30 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-07-29 20:53:30 +0200
commit8afe27885bed1fdc38a620abe4935fd7136fd60f (patch)
tree52880a2afa0575d7698f6adbba6b89c34fef8806 /tests/unit/completion/test_models.py
parentf42cc99595d97ce14ac6a8c530b13f176ae2faee (diff)
downloadqutebrowser-8afe27885bed1fdc38a620abe4935fd7136fd60f.tar.gz
qutebrowser-8afe27885bed1fdc38a620abe4935fd7136fd60f.zip
Add timestamp to :undo completion
Diffstat (limited to 'tests/unit/completion/test_models.py')
-rw-r--r--tests/unit/completion/test_models.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py
index f105d2b8a..e602f0ab6 100644
--- a/tests/unit/completion/test_models.py
+++ b/tests/unit/completion/test_models.py
@@ -1269,11 +1269,14 @@ def test_forward_completion(tab_with_history, info):
def test_undo_completion(tabbed_browser_stubs, info):
"""Test :undo completion."""
entry1 = tabbedbrowser._UndoEntry(url=QUrl('https://example.org/'),
- history=None, index=None, pinned=None)
+ history=None, index=None, pinned=None,
+ created_at=datetime(2020, 1, 1))
entry2 = tabbedbrowser._UndoEntry(url=QUrl('https://example.com/'),
- history=None, index=None, pinned=None)
+ history=None, index=None, pinned=None,
+ created_at=datetime(2020, 1, 2))
entry3 = tabbedbrowser._UndoEntry(url=QUrl('https://example.net/'),
- history=None, index=None, pinned=None)
+ history=None, index=None, pinned=None,
+ created_at=datetime(2020, 1, 2))
# Most recently closed is at the end
tabbed_browser_stubs[0].undo_stack = [
@@ -1288,7 +1291,11 @@ def test_undo_completion(tabbed_browser_stubs, info):
# undo stack.
_check_completions(model, {
"Closed tabs": [
- ("1", "https://example.com/, https://example.net/", None),
- ("2", "https://example.org/", None),
+ ("1",
+ "https://example.com/, https://example.net/",
+ "2020-01-02 00:00"),
+ ("2",
+ "https://example.org/",
+ "2020-01-01 00:00"),
],
})