Mailman: add unit tests, and adatp to recent code changes
This commit is contained in:
parent
aaa825588e
commit
a116e1e34d
4 changed files with 17 additions and 10 deletions
|
@ -82,14 +82,5 @@ def main():
|
||||||
settings_admin.DATABASES["default"]["NAME"],
|
settings_admin.DATABASES["default"]["NAME"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# HyperKitty unit test database
|
|
||||||
give_rights(
|
|
||||||
settings_admin.DATABASES["default"]["HOST"],
|
|
||||||
settings_admin.DATABASES["default"]["USER"],
|
|
||||||
settings_admin.DATABASES["default"]["PASSWORD"],
|
|
||||||
"test_" + settings_admin.DATABASES["default"]["NAME"],
|
|
||||||
settings_admin.DATABASES["default"]["NAME"] + "app",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__": main()
|
if __name__ == "__main__": main()
|
||||||
|
|
|
@ -24,6 +24,10 @@ $BASEDIR/bin/pg-give-rights.py
|
||||||
# SELinux contexts
|
# SELinux contexts
|
||||||
restorecon -r "$BASEDIR"
|
restorecon -r "$BASEDIR"
|
||||||
|
|
||||||
|
# Run unit tests
|
||||||
|
django-admin test --pythonpath $CONFDIR --settings settings_test -P hyperkitty
|
||||||
|
nose2 kittystore
|
||||||
|
|
||||||
# Reload Apache to flush the python cache
|
# Reload Apache to flush the python cache
|
||||||
systemctl reload httpd
|
systemctl reload httpd
|
||||||
# Restart Mailman3 since kittystore was updated
|
# Restart Mailman3 since kittystore was updated
|
||||||
|
|
|
@ -120,6 +120,13 @@
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
- name: install the hyperkitty settings test file
|
||||||
|
copy: src=settings_test.py
|
||||||
|
dest="{{ mailman_webui_confdir }}/settings_test.py"
|
||||||
|
owner=root group=root mode=0640
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
|
||||||
- name: install the hyperkitty urls file
|
- name: install the hyperkitty urls file
|
||||||
copy: src=urls.py
|
copy: src=urls.py
|
||||||
dest="{{ mailman_webui_confdir }}/urls.py"
|
dest="{{ mailman_webui_confdir }}/urls.py"
|
||||||
|
|
|
@ -159,7 +159,7 @@ TEMPLATE_DIRS = (
|
||||||
)
|
)
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
'social_auth.backends.browserid.BrowserIDBackend',
|
#'social_auth.backends.browserid.BrowserIDBackend', # replaced with django_browserid
|
||||||
'hyperkitty.lib.fedora.FedoraBackend',
|
'hyperkitty.lib.fedora.FedoraBackend',
|
||||||
'social_auth.backends.google.GoogleBackend',
|
'social_auth.backends.google.GoogleBackend',
|
||||||
'social_auth.backends.yahoo.YahooBackend',
|
'social_auth.backends.yahoo.YahooBackend',
|
||||||
|
@ -190,6 +190,11 @@ INSTALLED_APPS = (
|
||||||
'postorius',
|
'postorius',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
import django
|
||||||
|
if django.VERSION[:2] < (1, 6):
|
||||||
|
TEST_RUNNER = 'discover_runner.DiscoverRunner'
|
||||||
|
|
||||||
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
|
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue