#NEWLINE# def test_possible_add_resource( self ) : #NEWLINE# #INDENT# spec = APISpecification ( version = 'v1' , base_url = 'http://api.glb.com' ) #NEWLINE# resource = Resource ( 'comments' ) #NEWLINE# resource . add_path ( Path ( '/comments' ) ) #NEWLINE# spec . add_resource ( resource ) #NEWLINE# assert ( len ( spec . resources ) == 1 ) #NEWLINE# assert ( len ( resource . paths ) == 1 ) #NEWLINE# assert ( resource . name == 'comments' ) #NEWLINE# assert ( spec . paths [ 0 ] . name == '/comments' )