pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

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

Open manycoding opened this issue 2 years ago • 2 comments

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",
    },
}

manycoding avatar Mar 16 '22 15:03 manycoding

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

Take a look at Django database settings.

I think this repo is not the place for asking Django configuration-related questions.

hramezani avatar Mar 16 '22 15:03 hramezani

But this tool provides certain features to simplify the setup. I am trying to wrap my head around it.

manycoding avatar Mar 16 '22 16:03 manycoding