create_group¶
Scope: function | Returns: callable
The create_group fixture returns a callable that creates a group in the test database.
Signature¶
create_group(
name: str,
local_name: str | LocaleString | None = None,
description: str = "",
active: bool = True,
dynamic: bool = False,
sid: str = "",
domain: str = "",
windows_account: str = "",
external_id: str = "",
user_members: Iterable[LimeUser | int] | None = None,
subgroup_members: Iterable[Group | int] | None = None,
_return_entity: bool = False,
) -> Group | int
Info
By default the callable returns the created group's ID as int. Pass _return_entity=True to get the full Group object instead.
Basic usage¶
Creating a group with members¶
Users and subgroups can be added at creation time by passing LimeUser or Group objects, or their IDs: