def test_inverse_mapping_raises_exception_when_values_arent_unique(): inverse_mapping({'a': 1, 'b': 1})
def test_inverse_mapping_works(): eq_(inverse_mapping({'a': 123, 'x': 'x'}), {123: 'a', 'x': 'x'})