#NEWLINE# def test_function_scheduling( self ) : #NEWLINE# #INDENT# sqs_connection = boto . connect_sqs ( '' , '' ) #NEWLINE# sqs_connection . create_queue ( self . queue_name ) #NEWLINE# queue = sqs_connection . get_queue ( self . queue_name ) #NEWLINE# messages = queue . get_messages ( ) #NEWLINE# self . assertEquals ( len ( messages ) , 0 ) #NEWLINE# schedule_function ( sqs_connection . queue_name , 'a-function' , '1' , '2' , kwarg1 = 1 , kwarg2 = 2 ) #NEWLINE# messages = queue . get_messages ( ) #NEWLINE# self . assertEquals ( len ( messages ) , 1 ) #NEWLINE# self . assertEquals ( json . loads ( messages [ 0 ] . get_body ( ) ) , { #NEWLINE# #INDENT# FUNCTION : 'a-function' , #NEWLINE# ARGS : [ '1' , '2' ] , #NEWLINE# KWARGS : { #NEWLINE# #INDENT# 'kwarg1' : 1 , #NEWLINE# 'kwarg2' : 2 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } )