mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Comeback of GithubObject
This commit is contained in:
@@ -1,5 +1,25 @@
|
||||
import unittest
|
||||
import MockMockMock
|
||||
|
||||
from GithubObject import GithubObject
|
||||
from GithubObject import GithubObject, SimpleScalarAttributes
|
||||
|
||||
class TestCase( unittest.TestCase ):
|
||||
def setUp( self ):
|
||||
unittest.TestCase.setUp( self )
|
||||
self.g = MockMockMock.Mock( "github" )
|
||||
self.o = self.GithubTestObject( self.g.object, { "a1": 1, "a2": 2 }, lazy = True )
|
||||
|
||||
def tearDown( self ):
|
||||
self.g.tearDown()
|
||||
unittest.TestCase.tearDown( self )
|
||||
|
||||
class GithubObjectWithOnlySimpleAttributes( TestCase ):
|
||||
GithubTestObject = GithubObject(
|
||||
"GithubTestObject",
|
||||
SimpleScalarAttributes( "a1", "a2", "a3", "a4" )
|
||||
)
|
||||
|
||||
def testConstruction( self ):
|
||||
pass # Everything is done in setUp/tearDown
|
||||
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user