Add for gifts: schema, crud, route, tests
This commit is contained in:
@@ -118,14 +118,14 @@ def mock_event(db_session, mock_user):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def gift_item_fixture(db_session, mock_user):
|
||||
def gift_item_fixture(db_session, mock_user, mock_event):
|
||||
"""
|
||||
Fixture to create and return a default GiftItem instance.
|
||||
The event_id, added_by, and other necessary attributes are predefined.
|
||||
"""
|
||||
gift_item = GiftItem(
|
||||
id=uuid.uuid4(),
|
||||
event_id=uuid.uuid4(),
|
||||
event_id=mock_event.id,
|
||||
added_by=mock_user.id,
|
||||
name="Default Gift",
|
||||
description="Default gift description.",
|
||||
@@ -218,13 +218,13 @@ def event_theme_fixture(db_session):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def guest_fixture(db_session, mock_user):
|
||||
def guest_fixture(db_session, mock_user, mock_event):
|
||||
"""
|
||||
Fixture to create and return a default Guest instance.
|
||||
"""
|
||||
guest = Guest(
|
||||
id=uuid.uuid4(),
|
||||
event_id=uuid.uuid4(),
|
||||
event_id=mock_event.id,
|
||||
invited_by=mock_user.id,
|
||||
full_name="John Doe",
|
||||
email="johndoe@example.com",
|
||||
|
||||
Reference in New Issue
Block a user