Use file-based database during testing
This commit is contained in:
parent
172aa14b13
commit
48c25d1e5b
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,6 +30,7 @@ debug/*
|
|||||||
# Unit test and coverage reports
|
# Unit test and coverage reports
|
||||||
.coverage
|
.coverage
|
||||||
tests/file/*
|
tests/file/*
|
||||||
|
tests/db.sqlite3.test
|
||||||
.pytest_cache
|
.pytest_cache
|
||||||
|
|
||||||
# Plugin development
|
# Plugin development
|
||||||
|
@ -7,5 +7,5 @@ from openslides.__main__ import main
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
sys.argv.append('--help')
|
sys.argv.append("--help")
|
||||||
exit(main())
|
exit(main())
|
||||||
|
33
setup.py
33
setup.py
@ -8,38 +8,39 @@ from openslides import __version__ as openslides_version
|
|||||||
from openslides import __license__ as openslides_license
|
from openslides import __license__ as openslides_license
|
||||||
from openslides import __url__ as openslides_url
|
from openslides import __url__ as openslides_url
|
||||||
|
|
||||||
with open('README.rst') as readme:
|
with open("README.rst") as readme:
|
||||||
long_description = readme.read()
|
long_description = readme.read()
|
||||||
|
|
||||||
with open('requirements/production.txt') as requirements_production:
|
with open("requirements/production.txt") as requirements_production:
|
||||||
install_requires = requirements_production.readlines()
|
install_requires = requirements_production.readlines()
|
||||||
|
|
||||||
with open('requirements/big_mode.txt') as requirements_big_mode:
|
with open("requirements/big_mode.txt") as requirements_big_mode:
|
||||||
extras_requires = requirements_big_mode.readlines()
|
extras_requires = requirements_big_mode.readlines()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='openslides',
|
name="openslides",
|
||||||
author=openslides_author,
|
author=openslides_author,
|
||||||
author_email='support@openslides.com',
|
author_email="support@openslides.com",
|
||||||
description=openslides_description,
|
description=openslides_description,
|
||||||
license=openslides_license,
|
license=openslides_license,
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
url=openslides_url,
|
url=openslides_url,
|
||||||
version=openslides_version,
|
version=openslides_version,
|
||||||
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||||
# 'Development Status :: 3 - Alpha',
|
# 'Development Status :: 3 - Alpha',
|
||||||
'Development Status :: 4 - Beta',
|
"Development Status :: 4 - Beta",
|
||||||
# 'Development Status :: 5 - Production/Stable',
|
# 'Development Status :: 5 - Production/Stable',
|
||||||
'Environment :: Web Environment',
|
"Environment :: Web Environment",
|
||||||
'Framework :: Django',
|
"Framework :: Django",
|
||||||
'License :: OSI Approved :: MIT License',
|
"License :: OSI Approved :: MIT License",
|
||||||
'Operating System :: OS Independent',
|
"Operating System :: OS Independent",
|
||||||
'Programming Language :: Python :: 3.6',
|
"Programming Language :: Python :: 3.6",
|
||||||
'Programming Language :: Python :: 3.7', ],
|
"Programming Language :: Python :: 3.7",
|
||||||
packages=find_packages(exclude=['tests', 'tests.*']),
|
],
|
||||||
|
packages=find_packages(exclude=["tests", "tests.*"]),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
extras_require={'big_mode': extras_requires},
|
extras_require={"big_mode": extras_requires},
|
||||||
entry_points={'console_scripts': ['openslides = openslides.__main__:main']})
|
entry_points={"console_scripts": ["openslides = openslides.__main__:main"]},
|
||||||
|
)
|
||||||
|
@ -38,7 +38,12 @@ DEBUG = False
|
|||||||
|
|
||||||
# Change this setting to use e. g. PostgreSQL or MySQL.
|
# Change this setting to use e. g. PostgreSQL or MySQL.
|
||||||
|
|
||||||
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}}
|
DATABASES = {
|
||||||
|
"default": {
|
||||||
|
"ENGINE": "django.db.backends.sqlite3",
|
||||||
|
"TEST": {"NAME": os.path.join(OPENSLIDES_USER_DATA_PATH, "db.sqlite3.test")},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
|
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user