'MetadataDice: case-preserving lookup'

def test_metadata_dict_cs(self):

    expected_var = u'Na\xefVe'
    key_var = '$TitlE'
    m = MetadataDict({key_var.lower(): expected_var.lower(), key_var: expected_var})
    self.assertFalse(('$track' in m))
    self.assertTrue(('$tITLe' in m), "cross-case    lookup    with    'in'")
    self.assertEqual(m[key_var.lower()], expected_var.lower(), 'case-preserving    lookup    lower')
    self.assertEqual(m[key_var], expected_var, 'case-preserving    lookup    variable')
