#NEWLINE# @ mock . patch . object ( constraints . ConstraintHandler , 'get_all_classes' ) #NEWLINE# def test_get_constraint_classes_normal( self , getcls ) : #NEWLINE# #INDENT# self . flags ( scheduler_solver_constraints = [ 'FakeConstraint1' ] , group = 'solver_scheduler' ) #NEWLINE# getcls . return_value = [ FakeConstraint1 , FakeConstraint2 ] #NEWLINE# constraint_classes = self . solver . _get_constraint_classes ( ) #NEWLINE# self . assertIn ( FakeConstraint1 , constraint_classes ) #NEWLINE# self . assertNotIn ( FakeConstraint2 , constraint_classes )