Fixes for issue #86

This commit is contained in:
Vincent Jacques
2012-09-16 20:39:00 +02:00
parent aadb06753c
commit c6609fd4da
8 changed files with 104 additions and 34 deletions
+58
View File
@@ -0,0 +1,58 @@
# Copyright 2012 Vincent Jacques
# vincent@vincent-jacques.net
# This file is part of PyGithub. http://vincent-jacques.net/PyGithub
# PyGithub is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License along with PyGithub. If not, see <http://www.gnu.org/licenses/>.
from AuthenticatedUser import *
from Authentication import *
from Authorization import *
from Branch import *
from Commit import *
from CommitComment import *
from CommitStatus import *
from ContentFile import *
from Download import *
from Event import *
from Gist import *
from GistComment import *
from GitBlob import *
from GitCommit import *
from Github import *
from GitRef import *
from GitTag import *
from GitTree import *
from Hook import *
from Issue import *
from IssueComment import *
from IssueEvent import *
from Label import *
from Milestone import *
from NamedUser import *
from Markdown import *
from Organization import *
from PullRequest import *
from PullRequestComment import *
from PullRequestFile import *
from RateLimiting import *
from Repository import *
from RepositoryKey import *
from Tag import *
from Team import *
from UserKey import *
from PaginatedList import *
from Exceptions import *
from Enterprise import *
from Issue33 import *
from Issue50 import *
from Issue54 import *
from Issue80 import *
+2 -7
View File
@@ -16,9 +16,7 @@ import sys
import unittest
import httplib
import traceback
import itertools
sys.path = [ os.path.join( os.path.dirname( __file__ ), ".." ) ] + sys.path
import github
class FakeHttpResponse:
@@ -175,8 +173,5 @@ class TestCase( BasicTestCase ):
BasicTestCase.setUp( self )
self.g = github.Github( self.login, self.password )
def main():
if "--record" in sys.argv:
BasicTestCase.recordMode = True
unittest.main( argv = [ arg for arg in sys.argv if arg != "--record" ] )
def activateRecordMode():
BasicTestCase.recordMode = True
+19
View File
@@ -0,0 +1,19 @@
# Copyright 2012 Vincent Jacques
# vincent@vincent-jacques.net
# This file is part of PyGithub. http://vincent-jacques.net/PyGithub
# PyGithub is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License along with PyGithub. If not, see <http://www.gnu.org/licenses/>.
import unittest
import AllTests
def run():
unittest.main( module = AllTests, argv = [ "Dummy Script Name" ] )
+15
View File
@@ -0,0 +1,15 @@
import sys
import unittest
import Framework
import AllTests
def main( argv ):
if "--record" in argv:
Framework.activateRecordMode()
argv = [ arg for arg in argv if arg != "--record" ]
unittest.main( module = AllTests, argv = argv )
if __name__ == "__main__":
main( sys.argv )