Пример #1
0
 def test_require_patch(self):
     time = 500.0
     timezone = 120
     self.assertRaises(errors.PatchMissing, merge_directive.MergeDirective,
         'example:', 'sha', time, timezone, 'http://example.com',
         patch_type='bundle')
     md = merge_directive.MergeDirective('example:', 'sha1', time, timezone,
         'http://example.com', source_branch="http://example.org",
         patch='', patch_type='diff')
     self.assertEqual(md.patch, '')
 def make_merge_directive(self,
                          revision_id,
                          testament_sha1,
                          time,
                          timezone,
                          target_branch,
                          patch=None,
                          patch_type=None,
                          source_branch=None,
                          message=None):
     return merge_directive.MergeDirective(revision_id, testament_sha1,
                                           time, timezone, target_branch,
                                           patch, patch_type, source_branch,
                                           message)