def create_default_groups(self):
        for group in self.groups:
            group = group.replace(" ", "_").lower()
            self[group] = NamedRequirements(group)
def test_when_verbose_and_retcode_is_nonzero_output_should_be_had():
    expected_stderr = "this is something fnord"
    with patch.dict(
        pdbedit.__salt__,
        {
            "cmd.run_all": MagicMock(
                return_value={"stdout": "", "stderr": expected_stderr, "retcode": 1}
            )
        },
    ), patch("salt.modules.pdbedit.log.error", autospec=True) as fake_error_log:
        pdbedit.list_users(verbose=True)
        actual_error = fake_error_log.mock_calls[0].args[0]
        assert actual_error == expected_stderr