#NEWLINE# def test_reactivate_user( self ) : #NEWLINE# #INDENT# 'Confirm that reactivating a user re-opens its user case.' #NEWLINE# self . user . save ( ) #NEWLINE# user_case = CaseAccessors ( TEST_DOMAIN ) . get_case_by_domain_hq_user_id ( user_case . user . _id , USERCASE_TYPE ) #NEWLINE# self . assertIsNotNone ( user_case ) #NEWLINE# self . user . is_active = False #NEWLINE# self . user . save ( ) #NEWLINE# user_case = CaseAccessors ( TEST_DOMAIN ) . get_case_by_domain_hq_user_id ( self . user . _id , USERCASE_TYPE ) #NEWLINE# self . assertTrue ( user_case . closed ) #NEWLINE# self . user . is_active = True #NEWLINE# self . user . save ( ) #NEWLINE# user_case = CaseAccessors ( TEST_DOMAIN ) . get_case_by_domain_hq_user_id ( self . user . _id , USERCASE_TYPE ) #NEWLINE# self . assertFalse ( user_case . closed )