-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update pupa clean so that Jurisdiction, Division, and Post objects are not deleted #354
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# django settings for tests | ||
import os | ||
|
||
SECRET_KEY = 'test' | ||
INSTALLED_APPS = ('django.contrib.contenttypes', | ||
'opencivicdata.core.apps.BaseConfig', | ||
|
@@ -7,11 +9,11 @@ | |
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.contrib.gis.db.backends.postgis', | ||
'NAME': 'test', | ||
'USER': 'test', | ||
'PASSWORD': 'test', | ||
'HOST': 'localhost', | ||
'PORT': 5432, | ||
'NAME': os.getenv('POSTGRES_DB', 'test'), | ||
'USER': os.getenv('POSTGRES_USER', 'test'), | ||
'PASSWORD': os.getenv('POSTGRES_PASSWORD', 'test'), | ||
'HOST': os.getenv('POSTGRES_HOST', 'localhost'), | ||
'PORT': os.getenv('POSTGRES_PORT', 5432), | ||
Comment on lines
+12
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allow for setting these as environment variables, useful for, e.g., if you are running Postgres in a container. |
||
} | ||
} | ||
MIDDLEWARE_CLASSES = () |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
entry_points='''[console_scripts] | ||
pupa = pupa.cli.__main__:main''', | ||
install_requires=[ | ||
'Django>=2.2', | ||
'Django>=2.2,<5', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'opencivicdata>=3.3.0', | ||
'dj_database_url>=0.3.0', | ||
'scrapelib>=1.0', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest complained when this was instantiated multiple times.