Skip to content

Commit

Permalink
Clean up test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
tomako committed Jan 16, 2025
1 parent f014f3e commit ccc338d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions citadel/indico_citadel/schemas_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
from indico.modules.events.notes.models.notes import EventNote, RenderMode


pytest_plugins = 'indico.modules.events.timetable.testing.fixtures'


def test_dump_event(db, dummy_user, dummy_event):
from .schemas import EventRecordSchema

Expand Down Expand Up @@ -67,7 +64,7 @@ def test_dump_event(db, dummy_user, dummy_event):


@pytest.mark.parametrize('scheduled', (False, True))
def test_dump_contribution(db, dummy_user, dummy_event, dummy_contribution, create_entry, scheduled):
def test_dump_contribution(db, dummy_user, dummy_event, dummy_contribution, create_timetable_entry, scheduled):
from .schemas import ContributionRecordSchema

person = EventPerson.create_from_user(dummy_user, dummy_event)
Expand All @@ -76,7 +73,7 @@ def test_dump_contribution(db, dummy_user, dummy_event, dummy_contribution, crea

extra = {}
if scheduled:
create_entry(dummy_contribution, utc.localize(datetime(2020, 4, 20, 4, 20)))
create_timetable_entry(dummy_event, dummy_contribution, utc.localize(datetime(2020, 4, 20, 4, 20)))
extra = {
'start_dt': dummy_contribution.start_dt.isoformat(),
'end_dt': dummy_contribution.end_dt.isoformat(),
Expand Down Expand Up @@ -114,12 +111,12 @@ def test_dump_contribution(db, dummy_user, dummy_event, dummy_contribution, crea


@pytest.mark.parametrize('scheduled', (False, True))
def test_dump_subcontribution(db, dummy_user, dummy_event, dummy_contribution, create_entry, scheduled):
def test_dump_subcontribution(db, dummy_user, dummy_event, dummy_contribution, create_timetable_entry, scheduled):
from .schemas import SubContributionRecordSchema

extra = {}
if scheduled:
create_entry(dummy_contribution, utc.localize(datetime(2020, 4, 20, 4, 20)))
create_timetable_entry(cummy_event, dummy_contribution, utc.localize(datetime(2020, 4, 20, 4, 20)))

Check failure on line 119 in citadel/indico_citadel/schemas_test.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (F821)

citadel/indico_citadel/schemas_test.py:119:32: F821 Undefined name `cummy_event`
extra = {
'start_dt': dummy_contribution.start_dt.isoformat(),
'end_dt': dummy_contribution.end_dt.isoformat(),
Expand Down

0 comments on commit ccc338d

Please sign in to comment.