def test_list_groups(self): """ Test if it return a list of groups the named user belongs to """ with patch("salt.utils.user.get_group_list", MagicMock(return_value="Salt")): self.assertEqual(useradd.list_groups("name"), "Salt")
def test_list_groups(self): ''' Test if it return a list of groups the named user belongs to ''' with patch('salt.utils.user.get_group_list', MagicMock(return_value='Salt')): self.assertEqual(useradd.list_groups('name'), 'Salt')
def test_list_groups(self): ''' Test if it return a list of groups the named user belongs to ''' self.assertEqual(useradd.list_groups('name'), 'Salt')