#NEWLINE# def test_award_times( self ) : #NEWLINE# #INDENT# badge = self . user_settings . badges [ 0 ] #NEWLINE# assert_true ( self . user_settings . can_award ) #NEWLINE# url = api_url_for ( 'award_badge' , pid = self . project . _id ) #NEWLINE# ret = self . app . post_json ( badge , { #NEWLINE# #INDENT# 'badgeid' : badge . _id , #NEWLINE# #UNINDENT# } , auth = self . user . auth ) #NEWLINE# ret = self . app . post_json ( url , { #NEWLINE# #INDENT# 'badgeid' : badge . _id , #NEWLINE# #UNINDENT# } , auth = self . user . auth ) #NEWLINE# ret = self . app . post_json ( url , { #NEWLINE# #INDENT# 'badgeid' : badge . _id , #NEWLINE# #UNINDENT# } , auth = self . user . auth ) #NEWLINE# self . project . reload ( ) #NEWLINE# assert_equals ( ret . status_int , 200 ) #NEWLINE# badge . reload ( ) #NEWLINE# assert_equals ( badge . awarded_count , 3 ) #NEWLINE# ret = self . app . post_json ( url , { #NEWLINE# #INDENT# 'badgeid' : badge . _id , #NEWLINE# #UNINDENT# } , auth = self . user . auth ) #NEWLINE# ret = self . app . post_json ( url , { #NEWLINE# #INDENT# 'badgeid' : badge . _id , #NEWLINE# #UNINDENT# } , auth = self . user . auth ) #NEWLINE# badge . reload ( ) #NEWLINE# assert_equals ( badge . awarded_count , 5 )