mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
tests: Add tests for selection of unicode projects and tags
This commit is contained in:
parent
5e601bcf97
commit
edaebb9fb4
1 changed files with 72 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from tests.base import IntegrationTest
|
||||
from time import sleep
|
||||
|
||||
|
@ -218,3 +219,74 @@ class TestChooseTagNoSelected(IntegrationTest):
|
|||
assert self.tasks[0]['tags'] == set(["home"])
|
||||
assert self.tasks[1]['tags'] == set()
|
||||
|
||||
|
||||
class TestChooseProjectUnicode(IntegrationTest):
|
||||
|
||||
viminput = """
|
||||
* [ ] test task 1 #{uuid}
|
||||
* [ ] test task 2 #{uuid}
|
||||
"""
|
||||
|
||||
vimoutput = """
|
||||
* [ ] test task 1 #{uuid}
|
||||
* [ ] test task 2 #{uuid}
|
||||
"""
|
||||
|
||||
tasks = [
|
||||
dict(description="test task 1", project=u"Hôme"),
|
||||
dict(description="test task 2"),
|
||||
]
|
||||
|
||||
def execute(self):
|
||||
self.client.normal('2gg')
|
||||
sleep(1)
|
||||
|
||||
self.command("TaskWikiChooseProject")
|
||||
sleep(1)
|
||||
|
||||
self.client.normal('5gg')
|
||||
sleep(0.5)
|
||||
self.client.feedkeys("\\<CR>")
|
||||
sleep(1)
|
||||
|
||||
for task in self.tasks:
|
||||
task.refresh()
|
||||
|
||||
assert self.tasks[0]['project'] == u"Hôme"
|
||||
assert self.tasks[1]['project'] == u"Hôme"
|
||||
|
||||
|
||||
class TestChooseTagUnicode(IntegrationTest):
|
||||
|
||||
viminput = """
|
||||
* [ ] test task 1 #{uuid}
|
||||
* [ ] test task 2 #{uuid}
|
||||
"""
|
||||
|
||||
vimoutput = """
|
||||
* [ ] test task 1 #{uuid}
|
||||
* [ ] test task 2 #{uuid}
|
||||
"""
|
||||
|
||||
tasks = [
|
||||
dict(description="test task 1", tags=[u"hôme"]),
|
||||
dict(description="test task 2"),
|
||||
]
|
||||
|
||||
def execute(self):
|
||||
self.client.normal('2gg')
|
||||
sleep(1)
|
||||
|
||||
self.command("TaskWikiChooseTag")
|
||||
sleep(1)
|
||||
|
||||
self.client.normal('4gg')
|
||||
sleep(0.5)
|
||||
self.client.feedkeys("\\<CR>")
|
||||
sleep(1)
|
||||
|
||||
for task in self.tasks:
|
||||
task.refresh()
|
||||
|
||||
assert self.tasks[0]['tags'] == set([u"hôme"])
|
||||
assert self.tasks[1]['tags'] == set([u"hôme"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue