This repository has been archived on 2021-04-21. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-07 14:51:55 +00:00
|
|
|
import sys
|
|
|
|
|
|
|
|
import django
|
|
|
|
import yaml
|
|
|
|
from django.conf import settings as django_settings
|
|
|
|
from djangoldp.conf.ldpsettings import LDPSettings
|
|
|
|
from djangoldp_webpushnotification.tests.settings_default import yaml_config
|
|
|
|
|
|
|
|
config = yaml.safe_load(yaml_config)
|
|
|
|
ldpsettings = LDPSettings(config)
|
|
|
|
django_settings.configure(ldpsettings)
|
|
|
|
|
|
|
|
django.setup()
|
|
|
|
from django.test.runner import DiscoverRunner
|
|
|
|
|
|
|
|
test_runner = DiscoverRunner(verbosity=1)
|
|
|
|
|
|
|
|
failures = test_runner.run_tests([
|
|
|
|
'djangoldp_webpushnotification.tests.tests_vapidkeyset',
|
2021-04-08 14:59:00 +00:00
|
|
|
'djangoldp_webpushnotification.tests.tests_accept_subscription',
|
2021-04-07 14:51:55 +00:00
|
|
|
])
|
|
|
|
if failures:
|
|
|
|
sys.exit(failures)
|