Esempio n. 1
0
    def test_list_groups(self):
        '''
        Return a list of groups the named user belongs to
        '''
        mock_group = 'saltgroup'

        with patch('salt.utils.get_group_list', MagicMock(return_value=[mock_group])):
            self.assertEqual(pw_user.list_groups('name'), [mock_group])
Esempio n. 2
0
    def test_list_groups(self):
        '''
        Return a list of groups the named user belongs to
        '''
        mock_group = 'saltgroup'

        with patch('salt.utils.user.get_group_list', MagicMock(return_value=[mock_group])):
            self.assertEqual(pw_user.list_groups('name'), [mock_group])
Esempio n. 3
0
    def test_list_groups(self):
        """
        Return a list of groups the named user belongs to
        """
        mock_group = "saltgroup"

        with patch("salt.utils.user.get_group_list",
                   MagicMock(return_value=[mock_group])):
            self.assertEqual(pw_user.list_groups("name"), [mock_group])
Esempio n. 4
0
 def test_list_groups(self):
     '''
     Return a list of groups the named user belongs to
     '''
     self.assertEqual(pw_user.list_groups('name'), 'A')
Esempio n. 5
0
 def test_list_groups(self):
     '''
     Return a list of groups the named user belongs to
     '''
     self.assertEqual(pw_user.list_groups('name'), 'A')