#NEWLINE# def test_award_badge( self ) : #NEWLINE# #INDENT# badgeid = self . user_settings . badges [ 0 ] . _id #NEWLINE# initnum = get_node_badges ( self . project ) . count ( ) #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 ( badgeid , { #NEWLINE# #INDENT# 'badgeid' : badgeid , #NEWLINE# #UNINDENT# } , auth = self . user . auth ) #NEWLINE# self . project . reload ( ) #NEWLINE# assert_equals ( ret . status_int , 200 ) #NEWLINE# assert_equals ( ( initnum + 1 ) , get_node_badges ( self . project ) . count ( ) )