mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests: Run viminput through UUID filler too
This commit is contained in:
parent
63b66ed79a
commit
2d7adc4926
1 changed files with 13 additions and 12 deletions
|
@ -100,18 +100,6 @@ class IntegrationTest(object):
|
|||
|
||||
def test_execute(self):
|
||||
|
||||
# First, run sanity checks
|
||||
self.check_sanity()
|
||||
|
||||
# Then load the input
|
||||
if self.viminput:
|
||||
# Unindent the lines
|
||||
lines = [l[4:] for l in self.viminput.strip('\n').splitlines()]
|
||||
self.write_buffer(lines)
|
||||
|
||||
# Do the stuff
|
||||
self.execute()
|
||||
|
||||
# Helper function that fills in {uuid} placeholders with correct UUIDs
|
||||
def fill_uuid(line):
|
||||
# Tasks in testing can have only alphanumerical descriptions
|
||||
|
@ -123,6 +111,19 @@ class IntegrationTest(object):
|
|||
tasks = self.tw.tasks.filter(description=match.group('desc'))
|
||||
return line.format(uuid=tasks[0]['uuid']) if tasks else line
|
||||
|
||||
# First, run sanity checks
|
||||
self.check_sanity()
|
||||
|
||||
# Then load the input
|
||||
if self.viminput:
|
||||
# Unindent the lines
|
||||
lines = [fill_uuid(l[4:])
|
||||
for l in self.viminput.strip('\n').splitlines()]
|
||||
self.write_buffer(lines)
|
||||
|
||||
# Do the stuff
|
||||
self.execute()
|
||||
|
||||
# Check expected output
|
||||
if self.vimoutput:
|
||||
lines = [fill_uuid(l[4:])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue