Project1434.py
1 # ########################## Copyrights and license ############################ 2 # # 3 # Copyright 2020 Anuj Bansal <bansalanuj1996@gmail.com> # 4 # # 5 # This file is part of PyGithub. # 6 # http://pygithub.github.io/PyGithub/v1/index.html # 7 # # 8 # PyGithub is free software: you can redistribute it and/or modify it under # 9 # the terms of the GNU Lesser General Public License as published by the Free # 10 # Software Foundation, either version 3 of the License, or (at your option) # 11 # any later version. # 12 # # 13 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # 14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # 15 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # 16 # details. # 17 # # 18 # You should have received a copy of the GNU Lesser General Public License # 19 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. # 20 # # 21 # ############################################################################## 22 23 from . import Framework 24 25 26 class Project1434(Framework.TestCase): 27 def setUp(self): 28 super().setUp() 29 30 def testDelete(self): 31 project = self.g.get_project(4102095) 32 project.delete() 33 34 def testEditWithoutParameters(self): 35 project = self.g.get_project(4101939) 36 old_name = project.name 37 project.edit() 38 self.assertEqual(project.name, old_name) 39 40 def testEditWithAllParameters(self): 41 project = self.g.get_project(4101939) 42 project.edit("New Name", "New Body", "open") 43 self.assertEqual(project.name, "New Name") 44 self.assertEqual(project.body, "New Body") 45 self.assertEqual(project.state, "open")