def test_composite_key_with_additional_values(self): test_data = { 'name': 'test', 'level': 7, 'other': 'stuff', 'more': 'things' } assert matching.composite_key(test_data) == 'test: 7'
def test_composite_key_with_lower_case(self): test_data = {'name': 'foo', 'level': 'bar'} assert matching.composite_key(test_data) == 'foo: bar'
def test_composite_key_fails_when_value_missing(self): test_data = {'level': 7, 'other': 'stuff', 'more': 'things'} with pytest.raises(KeyError): matching.composite_key(test_data)
def test_composite_key_with_integers(self): test_data = {'name': 1, 'level': 5} assert matching.composite_key(test_data) == '1: 5'
def test_composite_key_with_upper_case(self): test_data = {'name': 'FOO', 'level': 'BAR'} assert matching.composite_key(test_data) == 'foo: bar'