Skip to content

feat: Separate task processor database #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emyller
Copy link
Contributor

@emyller emyller commented May 5, 2025

@emyller emyller self-assigned this May 5, 2025
Comment on lines 19 to 26
@pytest.fixture
def task_processor_database_tasks(
mocker: MockerFixture,
settings: SettingsWrapper,
) -> Generator[Callable[..., list[Task]], None, None]:
"""
Prepare a fake tasks processor database
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not create an actual one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. We'd need to have a separate test suite, in order to setup a separate database — or something else. I agree it would provide us an improved functional test, but it comes with some drawbacks. I figured we could get away the way it is because:

  1. The actual task fetching is tested against the default database.
  2. The effort of setting up a new database could lead us to test Django stuff.

Still, I'm not 100% convinced myself. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emyller emyller force-pushed the feat/separate-task-processor-database branch from 81192cf to 0607086 Compare May 8, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants