diff --git a/gramps_webapi/data/apispec.yaml b/gramps_webapi/data/apispec.yaml index cded008b..fd2c15bf 100644 --- a/gramps_webapi/data/apispec.yaml +++ b/gramps_webapi/data/apispec.yaml @@ -778,7 +778,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -1380,7 +1380,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -1861,7 +1861,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -2248,7 +2248,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -2577,7 +2577,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -2894,7 +2894,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -3183,7 +3183,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -3484,7 +3484,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -4177,7 +4177,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -5791,7 +5791,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -5961,7 +5961,7 @@ paths: {"function": function, "invert": invert, "rules": [{"name": name, "values": [values], "regex": regex}]} - The function value is a string for the logical operation. Valid values are 'and', 'or', 'xor' and 'one'. If not present the default is 'and'. + The function value is a string for the logical operation. Valid values are 'and', 'or' and 'one'. If not present the default is 'and'. The invert value is a boolean, true or false, that indicates if the results should be inverted. If not present the default is false. @@ -9838,7 +9838,7 @@ definitions: type: string example: "All private males." function: - description: "Logical operation to use in evaluating multiple rules. Must be 'and', 'or', 'xor' or 'one'" + description: "Logical operation to use in evaluating multiple rules. Must be 'and', 'or' or 'one'" type: string example: "and" invert: diff --git a/tests/test_endpoints/test_families.py b/tests/test_endpoints/test_families.py index 1eb82be4..e3676240 100644 --- a/tests/test_endpoints/test_families.py +++ b/tests/test_endpoints/test_families.py @@ -291,15 +291,6 @@ def test_get_families_parameter_rules_expected_response_or_function(self): ) self.assertEqual(len(rv), 6) - def test_get_families_parameter_rules_expected_response_xor_function(self): - """Test rules parameter expected response for xor function.""" - rv = check_success( - self, - TEST_URL - + '?keys=handle&rules={"function":"xor","rules":[{"name":"IsBookmarked"},{"name":"HasRelType","values":["Unknown"]}]}', - ) - self.assertEqual(len(rv), 6) - def test_get_families_parameter_rules_expected_response_one_function(self): """Test rules parameter expected response for one function.""" rv = check_success( diff --git a/tests/test_endpoints/test_notes.py b/tests/test_endpoints/test_notes.py index 05193bcb..03341b0d 100644 --- a/tests/test_endpoints/test_notes.py +++ b/tests/test_endpoints/test_notes.py @@ -271,15 +271,6 @@ def test_get_notes_parameter_rules_expected_response_or_function(self): ) self.assertEqual(len(rv), 3) - def test_get_notes_parameter_rules_expected_response_xor_function(self): - """Test rules parameter expected response for xor function.""" - rv = check_success( - self, - TEST_URL - + '?keys=handle&rules={"function":"xor","rules":[{"name":"HasType","values":["Person Note"]},{"name":"NotePrivate"}]}', - ) - self.assertEqual(len(rv), 3) - def test_get_notes_parameter_rules_expected_response_one_function(self): """Test rules parameter expected response for one function.""" rv = check_success( @@ -488,4 +479,3 @@ def test_get_notes_link_format(self): 'Lewis Anderson Garner', html, ) - diff --git a/tests/test_endpoints/test_people.py b/tests/test_endpoints/test_people.py index 1aaeb9cc..9ef33b98 100644 --- a/tests/test_endpoints/test_people.py +++ b/tests/test_endpoints/test_people.py @@ -341,19 +341,6 @@ def test_get_people_parameter_rules_expected_response_or_function(self): for tag in item["tag_list"]: self.assertIn(tag, tag_handles) - def test_get_people_parameter_rules_expected_response_xor_function(self): - """Test rules parameter expected response for xor function.""" - rv = check_success( - self, - TEST_URL - + '?keys=gender,family_list&rules={"function":"xor","rules":[{"name":"IsFemale"},{"name":"MultipleMarriages"}]}', - ) - for item in rv: - if item["gender"] == 0: - self.assertLess(len(item["family_list"]), 2) - if len(item["family_list"]) > 1: - self.assertNotEqual(item["gender"], 0) - def test_get_people_parameter_rules_expected_response_one_function(self): """Test rules parameter expected response for one function.""" rv = check_success(