#NEWLINE# @ run_with_all_backends #NEWLINE# def test_close_case( self ) : #NEWLINE# #INDENT# case_id = uuid . uuid4 ( ) . hex #NEWLINE# opened_on = datetime . utcnow ( ) #NEWLINE# _submit_case_block ( True , case_id , user_id = 'user1' , owner_id = 'owner1' , case_type = 'demo' , case_name = 'create_case' , date_modified = opened_on ) #NEWLINE# modified_on = datetime . utcnow ( ) #NEWLINE# _submit_case_block ( False , case_id , user_id = 'user2' , date_modified = modified_on , close = True ) #NEWLINE# case = self . casedb . get_case ( case_id ) #NEWLINE# self . assertEqual ( case . owner_id , 'owner1' ) #NEWLINE# self . assertEqual ( case . modified_on , modified_on ) #NEWLINE# self . assertEqual ( case . modified_by , 'user2' ) #NEWLINE# self . assertTrue ( case . closed ) #NEWLINE# self . assertEqual ( case . closed_on , modified_on ) #NEWLINE# self . assertEqual ( case . closed_by , 'user2' ) #NEWLINE# self . assertTrue ( ( case . server_modified_on > modified_on ) )