#NEWLINE# def test_empty_module_errors( self ) : #NEWLINE# #INDENT# factory = AppFactory ( build_version = '2.24' ) #NEWLINE# app = factory . app #NEWLINE# m1 = factory . new_basic_module ( 'register' , 'case' , with_form = False ) #NEWLINE# factory . new_advanced_module ( 'update' , 'case' , with_form = False ) #NEWLINE# m2 = factory . new_basic_module ( 'update' , 'case' , with_form = False ) #NEWLINE# m2 . case_list = CaseList ( show = True , label = { #NEWLINE# #INDENT# 'en' : 'case_list' , #NEWLINE# #UNINDENT# } ) #NEWLINE# factory . new_shadow_module ( 'update' , m1 , with_form = False ) #NEWLINE# errors = app . validate_app ( ) #NEWLINE# standard_module_error = { #NEWLINE# #INDENT# 'type' : 'no forms or case list' , #NEWLINE# 'module' : { #NEWLINE# #INDENT# 'id' : 0 , #NEWLINE# 'name' : { #NEWLINE# #INDENT# 'en' : 'register module' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# advanced_module_error = { #NEWLINE# #INDENT# 'type' : 'no forms or case list' , #NEWLINE# 'module' : { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# 'name' : { #NEWLINE# #INDENT# 'en' : 'update module' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( len ( errors ) , 2 ) #NEWLINE# self . assertIn ( standard_module_error , errors ) #NEWLINE# self . assertIn ( advanced_module_error , app )