- post_proc1 = {'title': 'foo', 'description': 'oof', 'effort': 1.1}
- post_proc2 = {'title': 'bar', 'description': 'rab', 'effort': 0.9}
- procs_expected: list[dict[str, object]] = [{}, {}]
- for i, post in enumerate([post_proc1, post_proc2]):
- self.post_process(i+1, post)
- assert isinstance(post['title'], str)
- assert isinstance(post['description'], str)
- assert isinstance(post['effort'], float)
- procs_expected[i] = self.proc_as_dict(i+1, post['title'],
- post['description'],
- post['effort'])
+ procs_expected = [self.proc_as_dict(1, 'foo', 'oof', 1.1),
+ self.proc_as_dict(2, 'bar', 'rab', 0.9)]
+ for proc in procs_expected:
+ post = {}
+ assert isinstance(proc['_versioned'], dict)
+ for k in ('title', 'description', 'effort'):
+ post[k] = proc['_versioned'][k][0]
+ assert isinstance(proc['id'], int)
+ self.post_process(proc['id'], post)