def test_error_message_contains_hint_for_alias_conflict():
    error = OverlappingFieldsCanBeMerged.fields_conflict_message(
        "x", "a and b are different fields")
    hint = ('Fields "x" conflict because a and b are different fields. '
            "Use different aliases on the fields to fetch both "
            "if this was intentional.")
    assert error == hint
def test_error_message_contains_hint_for_alias_conflict():
    error = OverlappingFieldsCanBeMerged.fields_conflict_message('x', 'a and b are different fields')
    hint = (
        'Fields "x" conflict because a and b are different fields. '
        'Use different aliases on the fields to fetch both '
        'if this was intentional.'
    )
    assert error == hint
def fields_conflict(reason_name, reason, *locations):
    return {
        "message":
        OverlappingFieldsCanBeMerged.fields_conflict_message(
            reason_name, reason),
        "locations":
        list(locations),
    }
def fields_conflict(reason_name, reason, *locations):
    return {
        'message': OverlappingFieldsCanBeMerged.fields_conflict_message(reason_name, reason),
        'locations': list(locations)
    }
Esempio n. 5
0
def fields_conflict(reason_name, reason, *locations):
    return {
        'message': OverlappingFieldsCanBeMerged.fields_conflict_message(reason_name, reason),
        'locations': list(locations)
    }