示例#1
0
def test_null_does_not_match_payload():
    assert matches_payload(None) is False
示例#2
0
def test_payload_does_match_data_when_version_is_missing():
    data = {'protocol': 'mega'}
    assert matches_payload(data) is False
示例#3
0
def test_payload_does_match_data_when_protocol_is_missing():
    data = {'version': 1}
    assert matches_payload(data) is False
示例#4
0
def test_payload_does_not_match_data_when_version_is(version):
    data = {'protocol': 'mega', 'version': version}
    assert matches_payload(data) is False
示例#5
0
def test_payload_does_not_match_data_when_protocol_is(protocol):
    data = {'protocol': protocol, 'version': 1}
    assert matches_payload(data) is False
示例#6
0
def test_payload_matches_data_when_protocol_and_version_match():
    data = {'protocol': 'mega', 'version': 1}
    assert matches_payload(data) is True