comparison venv/lib/python2.7/site-packages/github/tests/ConditionalRequestUpdate.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 2013 AKFish <akfish@gmail.com> #
6 # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
7 # #
8 # This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ #
9 # #
10 # PyGithub is free software: you can redistribute it and/or modify it under #
11 # the terms of the GNU Lesser General Public License as published by the Free #
12 # Software Foundation, either version 3 of the License, or (at your option) #
13 # any later version. #
14 # #
15 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
17 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
18 # details. #
19 # #
20 # You should have received a copy of the GNU Lesser General Public License #
21 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
22 # #
23 # ##############################################################################
24
25 # #193: Line endings should be linux style
26
27 import Framework
28 import github
29
30
31 class ConditionalRequestUpdate(Framework.TestCase):
32 def setUp(self):
33 Framework.TestCase.setUp(self)
34 self.repo = self.g.get_repo("akfish/PyGithub")
35
36 def testDidNotUpdate(self):
37 self.assertFalse(self.repo.update(), msg="The repo is not changes. But update() != False")
38
39 def testDidUpdate(self):
40 self.assertTrue(self.repo.update(), msg="The repo should be changed by now. But update() != True")
41
42 def testUpdateObjectWithoutEtag(self):
43 r = self.g.get_repo("jacquev6/PyGithub")
44 self.assertTrue(r.update())