/ tests / Issue278.py
Issue278.py
 1  ############################ Copyrights and license ############################
 2  #                                                                              #
 3  # Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net>                 #
 4  # Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com>          #
 5  # Copyright 2018 sfdye <tsfdye@gmail.com>                                      #
 6  #                                                                              #
 7  # This file is part of PyGithub.                                               #
 8  # http://pygithub.readthedocs.io/                                              #
 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  from . import Framework
26  
27  
28  # Replay data forged by adding nulls to PaginatedList.setUp.txt and PaginatedList.testIteration.txt
29  class Issue278(Framework.TestCase):
30      def setUp(self):
31          super().setUp()
32          self.repo = self.g.get_user("openframeworks").get_repo("openFrameworks")
33          self.list = self.repo.get_issues()
34  
35      def testIteration(self):
36          self.assertEqual(len(list(self.list)), 333)