[Django] #34053: JS tests don't work without an internet connection

1 view
Skip to first unread message

Django

unread,
Sep 25, 2022, 7:30:22 AM9/25/22
to django-...@googlegroups.com
#34053: JS tests don't work without an internet connection
---------------------------------------------+------------------------
Reporter: Hugo Herter | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
---------------------------------------------+------------------------
Running the Javascript tests requires an internet connection to
https://cdnjs.cloudflare.com .

This makes the tests dependent on an extra third party, provides that
third party with the IP address of developers and test runners, and
prevents developers from running the tests without a connection to
Cloudflare.

The relevant line is in `js_tests/tests.html`:

<script
src='https://cdnjs.cloudflare.com/ajax/libs/ol3/4.6.5/ol.js'></script>

== How to reproduce

1. Install the dependencies using npm

git clone https://github.com/django/django.git
cd django/
npm install

2. Serve the page via a web server and open in in a browser

python3 -m http.server --bind 127.0.0.1

Open http://localhost:8000 with the network inspector open.

--
Ticket URL: <https://code.djangoproject.com/ticket/34053>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages