Conversation
9c2dc91 to
1dd288a
Compare
|
|
||
| import django.test | ||
| import django_webtest | ||
| import requests |
There was a problem hiding this comment.
we also need to declare this dependency
There was a problem hiding this comment.
Out of curiosity, roughly how painful would it be to do this without requests? If it's just 10-ish more lines of python with urllib, I'm tempted to use that instead
There was a problem hiding this comment.
On the other hand, we have requests in our uv.lock either way through mozilla-django-oidc; I don't have a strong opinion towards either direction
There was a problem hiding this comment.
Ah if we already install it anyway, fine with me
(although mozilla-django-oidc is a candidate for removal as soon as possible :D)
There was a problem hiding this comment.
The python standard library documentation explicitly recommends using the Requests package: https://docs.python.org/3/library/http.client.html
Considering that, I think it is fair to explicitly depend on it.
82622b2 to
4a7243f
Compare
699a166 to
8ecae58
Compare
3136822 to
ff3180a
Compare
# Conflicts: # evap/staff/tests/test_live.py # pyproject.toml # uv.lock
61642c4 to
f4b4496
Compare
This PR adds a subclass of
LiveServerTest:VisualRegressionTestCase. This allows to write test cases likeStaffSemesterViewRegressionTest, which are standard live server tests where you can useself.trigger_screenshot(<identifier>).The screenshot is then compared to a known good screenshot and the testcase fails, if there is a large enough difference (as specified by us) between the two.
The CI needs to provide three environment variables for the test to establish a connection to testing api:
VRT_APIURLVRT_APIKEYVRT_PROJECT