def test_pass_leading_digit(self): token = '123simple' result = CFVariableMixin.token(token) self.assertEqual(result, token)
def test_pass_mixture(self): token = 'S.imple@one+two_3' result = CFVariableMixin.token(token) self.assertEqual(result, token)
def test_fail_colon(self): result = CFVariableMixin.token('nope:') self.assertIsNone(result)
def test_pass_simple(self): token = 'simple' result = CFVariableMixin.token(token) self.assertEqual(result, token)
def test_fail_space(self): result = CFVariableMixin.token('nope nope') self.assertIsNone(result)
def test_fail_leading_at(self): result = CFVariableMixin.token('@nope') self.assertIsNone(result)
def test_fail_leading_underscore(self): result = CFVariableMixin.token('_nope') self.assertIsNone(result)
def test_passthru_None(self): result = CFVariableMixin.token(None) self.assertIsNone(result)
def test_fail_leading_plus(self): result = CFVariableMixin.token("+nope") self.assertIsNone(result)