def test_is_valid_key(self): for key in VALID_KEYS: self.assertTrue(apev2.is_valid_key(key), '%r is valid' % key) for key in INVALID_KEYS: self.assertFalse(apev2.is_valid_key(key), '%r is invalid' % key)