/ tests / Issue494.py
Issue494.py
 1  ############################ Copyrights and license ############################
 2  #                                                                              #
 3  # Copyright 2016 Sam Corbett <sam.corbett@cloudsoftcorp.com>                   #
 4  # Copyright 2018 sfdye <tsfdye@gmail.com>                                      #
 5  #                                                                              #
 6  # This file is part of PyGithub.                                               #
 7  # http://pygithub.readthedocs.io/                                              #
 8  #                                                                              #
 9  # PyGithub is free software: you can redistribute it and/or modify it under    #
10  # the terms of the GNU Lesser General Public License as published by the Free  #
11  # Software Foundation, either version 3 of the License, or (at your option)    #
12  # any later version.                                                           #
13  #                                                                              #
14  # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY  #
15  # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS    #
16  # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
17  # details.                                                                     #
18  #                                                                              #
19  # You should have received a copy of the GNU Lesser General Public License     #
20  # along with PyGithub. If not, see <http://www.gnu.org/licenses/>.             #
21  #                                                                              #
22  ################################################################################
23  
24  from . import Framework
25  
26  
27  class Issue494(Framework.TestCase):
28      def setUp(self):
29          super().setUp()
30          self.repo = self.g.get_repo("apache/brooklyn-server", lazy=True)
31          self.pull = self.repo.get_pull(465)
32  
33      def testRepr(self):
34          expected = (
35              'PullRequest(title="Change SetHostnameCustomizer to check if ' '/etc/sysconfig/network exist…", number=465)'
36          )
37          self.assertEqual(self.pull.__repr__(), expected)