'Helper to check that keys have been sanitized.'

def _check_vars_sanitized(self, vars, proc):

    self.assertTrue(('foo' in vars))
    self.assertIn(vars['foo'], (VARS['foo'], ("'%s'" % VARS['foo']), ('"%s"' % VARS['foo'])))
    self.assertTrue(('vars_dict' in vars))
    vars_dict = vars['vars_dict']
    ref_dict = VARS['vars_dict'].copy()
    ref_dict['password'] = proc.MASK
    self.assertTrue(((42 in vars_dict) or ('42' in vars_dict)))
    if (42 in vars_dict):
        self.assertDictEqual(vars_dict, ref_dict)
    else:
        self.assertTrue(('42' in vars_dict))
        self.assertIn(vars_dict['42'], ("'%s'" % ref_dict[42]), ('"%s"' % ref_dict[42]))
        self.assertTrue((('("\'foo\'",    "\'bar\'")' in vars_dict) or ('(\'"foo"\',    \'"bar"\')' in vars_dict)))
        self.assertTrue((('"password"' in vars_dict) or ("'password'" in vars_dict)))
        if ("'password'" in vars_dict):
            self.assertEqual(vars_dict["'password'"], proc.MASK)
        else:
            self.assertEqual(vars_dict['"password"'], proc.MASK)
    self.assertTrue(('password' in vars))
    self.assertEquals(vars['password'], proc.MASK)
    self.assertTrue(('the_secret' in vars))
    self.assertEquals(vars['the_secret'], proc.MASK)
    self.assertTrue(('a_password_here' in vars))
    self.assertEquals(vars['a_password_here'], proc.MASK)
    self.assertTrue(('api_key' in vars))
    self.assertEquals(vars['api_key'], proc.MASK)
    self.assertTrue(('apiKey' in vars))
    self.assertEquals(vars['apiKey'], proc.MASK)
    self.assertTrue(('access_token' in vars))
    self.assertEquals(vars['access_token'], proc.MASK)
