pytest-dev / pytest-dev/pytest-django

How to use mysql back-end from a file for tests

Open
#999 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

Could somebody point me to how I can set mysql back-end up?

At the moment I have sqlite which simply reads from a file, I want something similar but with mysql.

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": "tests/test_db.sqlite",
    },
    "reader": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": "tests/test_db.sqlite",
    },
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names only the DATABASES configuration and no repository file or test. First determine whether pytest-django documents configuring a MySQL test database, then identify the relevant documentation entry point and verify the example against Django's MySQL test setup. Done means a clear configuration answer or documentation update.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, mysql, python, sqlite
Domain
databases, testing
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.