<s> import github3 <EOL> from . helper import ( UnitHelper , create_example_data_helper , create_url_helper ) <EOL> get_example_data = create_example_data_helper ( '<STR_LIT>' ) <EOL> url_for = create_url_helper ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> reference_url_for = create_url_helper ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> get_commit_example_data = create_example_data_helper ( '<STR_LIT>' ) <EOL> get_reference_example_data = create_example_data_helper ( '<STR_LIT>' ) <EOL> class TestTree ( UnitHelper ) : <EOL> """<STR_LIT>""" <EOL> described_class = github3 . git . Tree <EOL> example_data = get_example_data ( ) <EOL> def test_eq ( self ) : <EOL> """<STR_LIT>""" <EOL> tree = github3 . git . Tree ( get_example_data ( ) ) <EOL> assert self . instance == tree <EOL> def test_ne ( self ) : <EOL> """<STR_LIT>""" <EOL> tree = github3 . git . Tree ( get_example_data ( ) ) <EOL> tree . _json_data [ '<STR_LIT>' ] = True <EOL> assert self . instance != tree <EOL> def test_repr ( self ) : <EOL> """<STR_LIT>""" <EOL> assert isinstance ( self . instance , github3 . git . Tree ) <EOL> assert repr ( self . instance ) . startswith ( '<STR_LIT>' ) <EOL> def test_recurse ( self ) : <EOL> """<STR_LIT>""" <EOL> self . instance . recurse ( ) <EOL> self . session . get . assert_called_once_with ( <EOL> url_for ( ) , <EOL> params = { '<STR_LIT>' : '<STR_LIT:1>' } <EOL> ) <EOL> class TestCommit ( UnitHelper ) : <EOL> """<STR_LIT>""" <EOL> described_class = github3 . git . Commit <EOL> example_data = get_commit_example_data ( ) <EOL> def test_repr ( self ) : <EOL> assert repr ( self . instance ) . startswith ( '<STR_LIT>' ) <EOL> def test_committer_as_User ( self ) : <EOL> """<STR_LIT>""" <EOL> user = self . instance . committer_as_User ( ) <EOL> assert isinstance ( user , github3 . users . User ) <EOL> def test_author_as_User ( self ) : <EOL> """<STR_LIT>""" <EOL> user = self . instance . author_as_User ( ) <EOL> assert isinstance ( user , github3 . users . User ) <EOL> class TestReference ( UnitHelper ) : <EOL> """<STR_LIT>""" <EOL> described_class = github3 . git . Reference <EOL> example_data = get_reference_example_data ( ) <EOL> def test_delete ( self ) : <EOL> self . instance . delete ( ) <EOL> self . session . delete . assert_called_once_with ( <EOL> reference_url_for ( ) <EOL> ) <EOL> def test_repr ( self ) : <EOL> assert repr ( self . instance ) . startswith ( '<STR_LIT>' ) <EOL> assert repr ( self . instance . object ) . startswith ( '<STR_LIT>' ) <EOL> def test_update ( self ) : <EOL> """<STR_LIT>""" <EOL> self . instance . update ( '<STR_LIT>' , True ) <EOL> try : <EOL> self . session . patch . assert_called_once_with ( <EOL> reference_url_for ( ) , <EOL> data = '<STR_LIT>' <EOL> ) <EOL> except AssertionError : <EOL> self . session . patch . assert_called_once_with ( <EOL> reference_url_for ( ) , <EOL> data = '<STR_LIT>' <EOL> ) </s>
