#NEWLINE# def test_macros( self ) : #NEWLINE# #INDENT# obj = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } #NEWLINE# paging = { #NEWLINE# #INDENT# 'page' : 1 , #NEWLINE# 'per_page' : 5 , #NEWLINE# #UNINDENT# } #NEWLINE# self . service . macros ( ) . get ( per_page = 5 , page = 1 ) #NEWLINE# self . expect ( 'GET' , '/macros' , paging ) #NEWLINE# self . service . macro ( 4 ) . get ( ) #NEWLINE# self . expect ( 'GET' , '/macros/4' ) #NEWLINE# self . service . macro ( 4 ) . update ( obj ) #NEWLINE# self . expect ( 'PATCH' , '/macros/4' , obj ) #NEWLINE# self . service . macros ( ) . create ( obj ) #NEWLINE# self . expect ( 'POST' , '/macros' , obj ) #NEWLINE# self . service . macro ( 4 ) . delete ( ) #NEWLINE# self . expect ( 'DELETE' , '/macros/4' ) #NEWLINE# self . service . macro ( 4 ) . actions ( ) . get ( per_page = 5 , page = 1 ) #NEWLINE# self . expect ( 'GET' , '/macros/4/actions' , paging ) #NEWLINE# self . service . macro ( 4 ) . action ( 1 ) . get ( ) #NEWLINE# self . expect ( 'GET' , '/macros/4/actions/1' ) #NEWLINE# self . service . macro ( 4 ) . action ( 1 ) . update ( paging ) #NEWLINE# self . expect ( 'PATCH' , '/macros/4/actions/1' , obj ) #NEWLINE# self . assertRaises ( base . MethodNotSupported , self . service . macro ( 4 ) . action ( 1 ) . delete )