#NEWLINE# def test_xform_id_added_to_case_xform_list_only_once( self ) : #NEWLINE# #INDENT# initial_amounts = [ ( p . _id , float ( 100 ) ) for p in self . products ] #NEWLINE# submissions = [ balance_submission ( [ amount ] ) for amount in initial_amounts ] #NEWLINE# case_block = CaseBlock ( create = False , case_id = self . sp . case_id , user_id = 'jack' , update = { #NEWLINE# #INDENT# 'test' : '1' , #NEWLINE# #UNINDENT# } ) . as_string ( ) #NEWLINE# instance_id = self . submit_xml_form ( '' . join ( ( [ submissions ] + submissions ) ) , timestamp = ( datetime . utcnow ( ) + timedelta ( ( - 30 ) ) ) ) #NEWLINE# case = CommCareCase . get ( self . sp . case_id ) #NEWLINE# self . assertIn ( instance_id , case . xform_ids ) #NEWLINE# self . assertEqual ( len ( case . xform_ids ) , len ( set ( case . xform_ids ) ) )