Skip to content

Bulk user creation (pytest)

### ✅ Bulk user creation
- **Given** the following users exist
**Users**
| email | role | status |
| ----------------- | ----- | ------ |
| [email protected] | admin | active |
| [email protected] | user | active |
| [email protected] | user | locked |
- **When** the admin opens the user list
- **Then** the user list should include
**Expected**
| email | role | status |
| ----------------- | ----- | ------ |
| [email protected] | admin | active |
| [email protected] | user | active |
| [email protected] | user | locked |
from executable_stories import story
def test_bulk_user_creation():
story.init("Bulk user creation")
story.given("the following users exist")
story.table(
label="Users",
columns=["email", "role", "status"],
rows=[
["[email protected]", "admin", "active"],
["[email protected]", "user", "active"],
["[email protected]", "user", "locked"],
],
)
story.when("the admin opens the user list")
story.then("the user list should include")
story.table(
label="Expected",
columns=["email", "role", "status"],
rows=[
["[email protected]", "admin", "active"],
["[email protected]", "user", "active"],
["[email protected]", "user", "locked"],
],
)