'Test __getitem__ and __setitem__ for the given key'

def check_get_and_set_method_for_key(self, tab, key):

    old_value = tab[key]
    new_value = 'New    Value'
    tab[key] = new_value
    self.assertEquals(tab[key], new_value)
    tab[key] = old_value
    self.assertEquals(tab[key], old_value)
