<s> import unittest <EOL> import github <EOL> class TestGithub ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . endpoint = "<STR_LIT>" <EOL> self . params = { "<STR_LIT:state>" : "<STR_LIT:all>" } <EOL> self . url = github . url ( self . endpoint , self . params ) <EOL> def test_user ( self ) : <EOL> u = github . user ( ) <EOL> u1 = github . user ( ) <EOL> self . assertTrue ( u ) <EOL> self . assertTrue ( u is u1 ) <EOL> def test_has_issues ( self ) : <EOL> self . assertTrue ( github . has_issues ( ( "<STR_LIT>" ) ) ) <EOL> self . assertFalse ( github . has_issues ( ( "<STR_LIT>" ) ) ) <EOL> def test_time_from_string ( self ) : <EOL> to = github . time ( github . user ( ) . get ( "<STR_LIT>" ) ) <EOL> def test_github_url ( self ) : <EOL> path = github . url ( self . endpoint , self . params ) <EOL> self . assertTrue ( len ( path ) > <NUM_LIT:0> ) <EOL> def test_github_request ( self ) : <EOL> response , status = github . request ( self . url ) <EOL> self . assertTrue ( response ) <EOL> self . assertTrue ( status ) <EOL> def test_github_paging_request ( self ) : <EOL> url = github . url ( "<STR_LIT>" , self . params ) <EOL> data , status = github . request ( url ) <EOL> self . assertTrue ( data ) <EOL> self . assertTrue ( status ) <EOL> def test_github_post_request ( self ) : <EOL> defaults = { <EOL> "<STR_LIT:title>" : "<STR_LIT>" , <EOL> } <EOL> url = github . url ( "<STR_LIT>" , self . params ) <EOL> data , status = github . request ( url , "<STR_LIT>" , defaults ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
