Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/tests/GitCommit.py @ 0:d67268158946 draft
planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
author | bcclaywell |
---|---|
date | Mon, 12 Oct 2015 17:43:33 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d67268158946 |
---|---|
1 # -*- coding: utf-8 -*- | |
2 | |
3 # ########################## Copyrights and license ############################ | |
4 # # | |
5 # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # | |
6 # Copyright 2012 Zearin <zearin@gonk.net> # | |
7 # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # | |
8 # # | |
9 # This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ # | |
10 # # | |
11 # PyGithub is free software: you can redistribute it and/or modify it under # | |
12 # the terms of the GNU Lesser General Public License as published by the Free # | |
13 # Software Foundation, either version 3 of the License, or (at your option) # | |
14 # any later version. # | |
15 # # | |
16 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # | |
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # | |
18 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # | |
19 # details. # | |
20 # # | |
21 # You should have received a copy of the GNU Lesser General Public License # | |
22 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. # | |
23 # # | |
24 # ############################################################################## | |
25 | |
26 import datetime | |
27 | |
28 import Framework | |
29 | |
30 | |
31 class GitCommit(Framework.TestCase): | |
32 def setUp(self): | |
33 Framework.TestCase.setUp(self) | |
34 self.commit = self.g.get_user().get_repo("PyGithub").get_git_commit("4303c5b90e2216d927155e9609436ccb8984c495") | |
35 | |
36 def testAttributes(self): | |
37 self.assertEqual(self.commit.author.name, "Vincent Jacques") | |
38 self.assertEqual(self.commit.author.email, "vincent@vincent-jacques.net") | |
39 self.assertEqual(self.commit.author.date, datetime.datetime(2012, 4, 17, 17, 55, 16)) | |
40 self.assertEqual(self.commit.committer.name, "Vincent Jacques") | |
41 self.assertEqual(self.commit.committer.email, "vincent@vincent-jacques.net") | |
42 self.assertEqual(self.commit.committer.date, datetime.datetime(2012, 4, 17, 17, 55, 16)) | |
43 self.assertEqual(self.commit.message, "Merge branch 'develop'\n") | |
44 self.assertEqual(len(self.commit.parents), 2) | |
45 self.assertEqual(self.commit.parents[0].sha, "936f4a97f1a86392637ec002bbf89ff036a5062d") | |
46 self.assertEqual(self.commit.parents[1].sha, "2a7e80e6421c5d4d201d60619068dea6bae612cb") | |
47 self.assertEqual(self.commit.sha, "4303c5b90e2216d927155e9609436ccb8984c495") | |
48 self.assertEqual(self.commit.tree.sha, "f492784d8ca837779650d1fb406a1a3587a764ad") | |
49 self.assertEqual(self.commit.url, "https://api.github.com/repos/jacquev6/PyGithub/git/commits/4303c5b90e2216d927155e9609436ccb8984c495") |