mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests: Add tests for tasks with unicode
This commit is contained in:
parent
a981523d88
commit
4b2514e731
2 changed files with 43 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from datetime import datetime
|
||||
from tasklib import local_zone
|
||||
from tests.base import IntegrationTest, MultipleSourceTest
|
||||
|
@ -301,3 +303,24 @@ class TestCreationDifferentTaskSource(MultipleSourceTest):
|
|||
# Check that corect data store has been used
|
||||
assert len(self.tw.tasks.all()) == 0
|
||||
assert len(self.extra_tw.tasks.all()) == 1
|
||||
|
||||
|
||||
class TestSimpleUnicodeTaskCreation(IntegrationTest):
|
||||
|
||||
viminput = u"""
|
||||
* [ ] This is a test täsk
|
||||
"""
|
||||
|
||||
vimoutput = u"""
|
||||
* [ ] This is a test täsk #{uuid}
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
self.command("w", regex="written$", lines=1)
|
||||
|
||||
# Check that only one tasks with this description exists
|
||||
assert len(self.tw.tasks.pending()) == 1
|
||||
|
||||
task = self.tw.tasks.pending()[0]
|
||||
assert task['description'] == u'This is a test täsk'
|
||||
assert task['status'] == 'pending'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue