#NEWLINE# @ xfail #NEWLINE# def test_formula_body( db_conn , cards_table ) : #NEWLINE# #INDENT# '\n    Expect a formula card to require a body.\n    ' #NEWLINE# ( card , errors ) = FormulaCard . insert ( db_conn , { #NEWLINE# #INDENT# 'unit_id' : 'RUF531' , #NEWLINE# 'name' : 'What is?' , #NEWLINE# 'options' : [ { #NEWLINE# #INDENT# 'value' : 'x' , #NEWLINE# 'correct' : True , #NEWLINE# 'feedback' : 'Bazaaa...' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'variables' : [ { #NEWLINE# #INDENT# 'name' : 'x' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'default_incorrect_feedback' : 'Boo!' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( len ( errors ) == 1 ) #NEWLINE# ( card , errors ) = card . update ( db_conn , { #NEWLINE# #INDENT# 'body' : 'Testing 1234' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( len ( card ) == 0 )