Пример #1
0
    def test_change_password(self):
        """
        Tests to change users password
        """
        mock = MagicMock(return_value="ABC")
        with patch.object(drac, "__execute_cmd", mock):
            self.assertEqual(drac.change_password("username", "password", 1),
                             "ABC")

        self.assertFalse(drac.change_password("username", "password", False),
                         False)
Пример #2
0
    def test_change_password(self):
        '''
        Tests to change users password
        '''
        mock = MagicMock(return_value='ABC')
        with patch.object(drac, '__execute_cmd', mock):
            self.assertEqual(drac.change_password('username',
                                                  'password', 1), 'ABC')

        self.assertFalse(drac.change_password('username',
                                              'password', False), False)
Пример #3
0
    def test_change_password(self):
        '''
        Tests to change users password
        '''
        mock = MagicMock(return_value='ABC')
        with patch.object(drac, '__execute_cmd', mock):
            self.assertEqual(drac.change_password('username',
                                                  'password', 1), 'ABC')

        self.assertFalse(drac.change_password('username',
                                              'password', False), False)