Beispiel #1
0
    def test_list_modules(self):
        """
        Test if it list the modules loaded on the minion
        """
        self.assertListEqual(sysmod.list_modules(), [])

        self.assertListEqual(sysmod.list_modules("s*"), [])
Beispiel #2
0
    def test_list_modules(self):
        '''
        Test if it list the modules loaded on the minion
        '''
        self.assertListEqual(sysmod.list_modules(), [])

        self.assertListEqual(sysmod.list_modules('s*'), [])
Beispiel #3
0
    def test_list_modules(self):
        '''
        Test if it lists the modules loaded on the minion
        '''
        self.assertListEqual(sysmod.list_modules(), self._modules)

        self.assertListEqual(sysmod.list_modules('nonexist'), [])

        self.assertListEqual(sysmod.list_modules('user'), ['user'])

        self.assertListEqual(sysmod.list_modules('s*'), ['sys', 'sysctl', 'system'])
Beispiel #4
0
    def test_list_modules(self):
        '''
        Test if it lists the modules loaded on the minion
        '''
        self.assertListEqual(sysmod.list_modules(), _modules)

        self.assertListEqual(sysmod.list_modules('nonexist'), [])

        self.assertListEqual(sysmod.list_modules('user'), ['user'])

        self.assertListEqual(sysmod.list_modules('s*'), ['sys', 'sysctl', 'system'])
Beispiel #5
0
    def test_list_modules(self):
        """
        Test if it lists the modules loaded on the minion
        """
        self.assertListEqual(sysmod.list_modules(), self._modules)

        self.assertListEqual(sysmod.list_modules("nonexist"), [])

        self.assertListEqual(sysmod.list_modules("user"), ["user"])

        self.assertListEqual(sysmod.list_modules("s*"),
                             ["sys", "sysctl", "system"])
Beispiel #6
0
    def test_list_functions(self):
        '''
        Test if it list the functions for all modules.
        '''
        self.assertListEqual(sysmod.list_functions(), functions)

        self.assertListEqual(sysmod.list_modules('nonexist'), [])

        # these all really do the same thing (*the '.' at the end is an internal implementation trick)
        self.assertListEqual(
            sysmod.list_functions('sys'),
            ['sys.doc', 'sys.list_functions', 'sys.list_modules'])
        self.assertListEqual(
            sysmod.list_functions('sys.'),
            ['sys.doc', 'sys.list_functions', 'sys.list_modules'])

        # globs can be used for both module names and function names:
        self.assertListEqual(sysmod.list_functions('sys*'), [
            'sys.doc', 'sys.list_functions', 'sys.list_modules', 'sysctl.get',
            'sysctl.show', 'system.halt', 'system.reboot'
        ])
        self.assertListEqual(sysmod.list_functions('sys.list*'),
                             ['sys.list_functions', 'sys.list_modules'])

        self.assertListEqual(sysmod.list_functions('sys.list'), [])