コード例 #1
0
 def _report(self, body):
     return {
         'backup': lambda body: backup_report.from_dict(self.id, body),
         'restore': lambda body: restore_report.from_dict(self.id, body)
     }[self._type](body)
コード例 #2
0
 def setUp(self):
     mock = mock_report.backup_report(errors=['explosions'],
                                      restorable=True)
     self.report = backup_report.from_dict(1, mock)