def test_simple_condition(self): """ test simple condition """ filter_ = data_models.Filter('state=A', data_models.Replica) assert filter_.match(self.replica_1) assert not filter_.match(self.replica_2)
def test_multiple_conditions(self): """ test multiple conditions """ filter_ = data_models.Filter('size=42,state=A', data_models.Replica) assert filter_.match(self.replica_1) assert not filter_.match(self.replica_2)
def test_multiple_conditions(self): """ test multiple conditions """ filter_ = data_models.Filter('size=42,state=A', data_models.Replica) ok_(filter_.match(self.replica_1), self.replica_1.size) # pylint: disable=no-member ok_(not filter_.match(self.replica_2), self.replica_2.size) # pylint: disable=no-member