Example #1
0
 def test_camelcase_to_underscore_joined(self):
     input_vs_expected = [
         ('GarbageCollection', 'garbage_collection'),
         ('DD', 'dd'),
         ('rr', 'rr'),
         ('AABbbC', 'aa_bbb_c'),
         ('AABbbCCCDd', 'aa_bbb_ccc_dd'),
         ('Manager', 'manager'),
         ('EthernetInterfaceCollection', 'ethernet_interface_collection'),
         (' ', ' '),
     ]
     for inp, exp in input_vs_expected:
         self.assertEqual(exp, utils.camelcase_to_underscore_joined(inp))
Example #2
0
 def resource_name(self):
     return utils.camelcase_to_underscore_joined(self.__class__.__name__)