19 lines
576 B
Python
19 lines
576 B
Python
import os
|
|
import pytest
|
|
|
|
from django.conf import settings
|
|
from django.test import override_settings
|
|
|
|
pytestmark = pytest.mark.django_db
|
|
|
|
def test_manifest_json(app):
|
|
app.get('/manifest.json', status=404)
|
|
|
|
templates_settings = [settings.TEMPLATES[0].copy()]
|
|
templates_settings[0]['DIRS'] = ['%s/templates-1' % os.path.abspath(os.path.dirname(__file__))]
|
|
with override_settings(TEMPLATES=templates_settings):
|
|
assert app.get('/manifest.json', status=200).json['name'] == 'test'
|
|
|
|
def test_service_worker(app):
|
|
app.get('/service-worker.js', status=200)
|