#NEWLINE# def _assert_case_is_in_es( self , case , esquery = CaseES ( ) ) : #NEWLINE# #INDENT# results = esquery . run ( ) #NEWLINE# self . assertEqual ( 1 , results . total ) #NEWLINE# case_doc = results . hits [ 0 ] #NEWLINE# self . assertEqual ( case . case_id , case_doc [ '_id' ] ) #NEWLINE# self . assertEqual ( self . domain , case_doc [ 'domain' ] ) #NEWLINE# self . assertEqual ( case . name , case_doc [ 'name' ] ) #NEWLINE# self . assertEqual ( 'CommCareCase' , case_doc [ 'doc_type' ] )