Exemple #1
0
 def is_valid(self, negotiator_id: str, offer: "Outcome") -> bool:
     issues = self.negotiators[negotiator_id][0].ami.issues
     return outcome_is_valid(offer, issues)
Exemple #2
0
def test_dict_outcomes(issues, valid_outcome_dict, invalid_outcome_dict):
    assert outcome_is_valid(valid_outcome_dict, issues)
    assert not outcome_is_valid(invalid_outcome_dict, issues)
Exemple #3
0
def test_list_outcomes(int_issues, valid_outcome_list, invalid_outcome_list):
    assert outcome_is_valid(valid_outcome_list, int_issues)
    assert not outcome_is_valid(invalid_outcome_list, int_issues)
Exemple #4
0
 def is_valid(self, negotiator_id: str, offer: "Outcome") -> bool:
     """Is this a valid offer for that negotiation"""
     issues = self.negotiators[negotiator_id][0].ami.issues
     return outcome_is_valid(offer, issues)