tests: Add test for adding a task to a different data source

This commit is contained in:
Tomas Babej 2015-04-05 21:45:29 +02:00
parent d590deaaa0
commit f842e1aa25

View file

@ -1,6 +1,6 @@
from datetime import datetime
from tasklib.task import local_zone
from tests.base import IntegrationTest
from tests.base import IntegrationTest, MultipleSourceTest
class TestSimpleTaskCreation(IntegrationTest):
@ -287,3 +287,17 @@ class TestChildTaskModification(IntegrationTest):
child = self.tw.tasks.filter(description="This is child task")[0]
assert parent['depends'] == set([child])
class TestCreationDifferentTaskSource(MultipleSourceTest):
viminput = """
* [ ] This is first data source task #H:
"""
def execute(self):
self.command('w', regex='written')
# Check that corect data store has been used
assert len(self.tw.tasks.all()) == 0
assert len(self.extra_tw.tasks.all()) == 1