コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
def fields_conflict(reason_name, reason, *locations):
    return {
        "message":
        OverlappingFieldsCanBeMerged.fields_conflict_message(
            reason_name, reason),
        "locations":
        list(locations),
    }
コード例 #4
0
def fields_conflict(reason_name, reason, *locations):
    return {
        'message': OverlappingFieldsCanBeMerged.fields_conflict_message(reason_name, reason),
        'locations': list(locations)
    }
コード例 #5
0
def fields_conflict(reason_name, reason, *locations):
    return {
        'message': OverlappingFieldsCanBeMerged.fields_conflict_message(reason_name, reason),
        'locations': list(locations)
    }