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"],
|
||||
)
|
||||
|
||||
# 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()
|
||||
|
|
|
@ -24,6 +24,10 @@ $BASEDIR/bin/pg-give-rights.py
|
|||
# SELinux contexts
|
||||
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
|
||||
systemctl reload httpd
|
||||
# Restart Mailman3 since kittystore was updated
|
||||
|
|
|
@ -120,6 +120,13 @@
|
|||
tags:
|
||||
- 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
|
||||
copy: src=urls.py
|
||||
dest="{{ mailman_webui_confdir }}/urls.py"
|
||||
|
|
|
@ -159,7 +159,7 @@ TEMPLATE_DIRS = (
|
|||
)
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'social_auth.backends.browserid.BrowserIDBackend',
|
||||
#'social_auth.backends.browserid.BrowserIDBackend', # replaced with django_browserid
|
||||
'hyperkitty.lib.fedora.FedoraBackend',
|
||||
'social_auth.backends.google.GoogleBackend',
|
||||
'social_auth.backends.yahoo.YahooBackend',
|
||||
|
@ -190,6 +190,11 @@ INSTALLED_APPS = (
|
|||
'postorius',
|
||||
)
|
||||
|
||||
|
||||
import django
|
||||
if django.VERSION[:2] < (1, 6):
|
||||
TEST_RUNNER = 'discover_runner.DiscoverRunner'
|
||||
|
||||
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue