Exemplo n.º 1
0
    def get_name(cls):
        if hasattr(cls, 'role_name'):
            return cls.role_name

        return camelToSnake(cls.__name__)
Exemplo n.º 2
0
    def get_name(cls):
        if hasattr(cls, 'role_name'):
            return cls.role_name

        return camelToSnake(cls.__name__)
Exemplo n.º 3
0
 def test_camel_to_snake(self):
     self.assertEqual(camelToSnake('camelCaseString'), 'camel_case_string')
     self.assertEqual(camelToSnake('Snake_Camel_String'),
                      'snake__camel__string')
 def test_camel_to_snake(self):
     self.assertEqual(camelToSnake('camelCaseString'), 'camel_case_string')
     self.assertEqual(camelToSnake('Snake_Camel_String'), 'snake__camel__string')