kriti21

Untitled

Jun 23rd, 2018
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.24 KB | None | 0 0
  1. class CommitResultTest(unittest.TestCase):
  2.     def setUp(self):
  3.         self.raw_commit_message = 'raw_commit_message'
  4.         self.commit_sha = 'commit_sha'
  5.         self.commit_type = ['commit_type']
  6.         self.modified_files = ['modified_files']
  7.         self.added_files = ['added_files']
  8.         self.deleted_files = ['deleted_files']
  9.  
  10.     def test_commitresult_object_repr(self):
  11.         repr_result = repr(CommitResult(VCSCommitBear,
  12.                                         self.raw_commit_message,
  13.                                         self.commit_sha,
  14.                                         self.commit_type,
  15.                                         self.modified_files,
  16.                                         self.added_files,
  17.                                         self.deleted_files,))
  18.  
  19.         repr_regex = (
  20.             r"<CommitResult object\(id=.+, origin=\'bearclass\', "
  21.             r"raw_commit_message=\'.+\', "
  22.             r"commit_sha=\'.+\', "
  23.             r"commit_type=\[.+\], "
  24.             r"modified_files=\[.+\], "
  25.             r"added_files=\[.+\], "
  26.             r"deleted_files=\[.+\], "
  27.             r"message=\'HEAD commit information\'\) at .+>"
  28.             )
  29.         self.assertRegex(repr_result, repr_regex)
Add Comment
Please, Sign In to add comment