mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 15:53:07 +02:00
tests: Add test for adding a task to a different data source
This commit is contained in:
parent
d590deaaa0
commit
f842e1aa25
1 changed files with 15 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from tasklib.task import local_zone
|
from tasklib.task import local_zone
|
||||||
from tests.base import IntegrationTest
|
from tests.base import IntegrationTest, MultipleSourceTest
|
||||||
|
|
||||||
|
|
||||||
class TestSimpleTaskCreation(IntegrationTest):
|
class TestSimpleTaskCreation(IntegrationTest):
|
||||||
|
@ -287,3 +287,17 @@ class TestChildTaskModification(IntegrationTest):
|
||||||
child = self.tw.tasks.filter(description="This is child task")[0]
|
child = self.tw.tasks.filter(description="This is child task")[0]
|
||||||
|
|
||||||
assert parent['depends'] == set([child])
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue