From 2d591a0964920e482076764c3e306964e12e856f Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 7 Jan 2017 13:38:34 +0100 Subject: [PATCH] tests: Add tests for unicode viewport definitions --- tests/test_viewport.py | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tests/test_viewport.py b/tests/test_viewport.py index c6b5f0e..30eff04 100644 --- a/tests/test_viewport.py +++ b/tests/test_viewport.py @@ -336,6 +336,49 @@ class TestViewportsUnicodeTaskGeneration(IntegrationTest): self.command("w", regex="written$", lines=1) +class TestUnicodeViewportsUnicodeTaskGeneration(IntegrationTest): + + viminput = """ + === Réunion 2017 | project:Réunion2017 === + """ + + vimoutput = u""" + === Réunion 2017 | project:Réunion2017 === + * [ ] Réunion task 1 #{uuid} + """ + + tasks = [ + dict(description=u"Réunion task 1", project=u'Réunion2017'), + ] + + def execute(self): + self.command("w", regex="written$", lines=1) + import time + time.sleep(40) + + +class TestUnicodeViewportsUnicodeDefaultsAssignment(IntegrationTest): + + viminput = """ + === Réunion 2017 | project:Réunion2017 === + * [ ] Réunion task 1 + """ + + vimoutput = u""" + === Réunion 2017 | project:Réunion2017 === + * [ ] Réunion task 1 #{uuid} + """ + + def execute(self): + self.command("w", regex="written$", lines=1) + assert len(self.tw.tasks.pending()) == 1 + + task = self.tw.tasks.pending()[0] + assert task['description'] == u'Réunion task 1' + assert task['status'] == 'pending' + assert task['project'] == u'Réunion2017' + + class TestViewportsSortedGeneration(IntegrationTest): viminput = """