mirror of
https://github.com/ae-utbm/sith.git
synced 2026-08-02 11:42:43 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71c5803525 | ||
|
|
79ec036b70 | ||
|
|
455b81cff6 | ||
|
|
9ceb51a54e | ||
|
|
790a1e15b1 | ||
|
|
b2ffcd3a37 | ||
|
|
ca37996d6a | ||
|
|
173311c1d5 | ||
|
|
2995823d6e |
@@ -886,28 +886,6 @@ class TestBarmanConnection(TestCase):
|
||||
)
|
||||
assert response.status_code == 403
|
||||
|
||||
def test_logout_then_login(self):
|
||||
"""Test that the login is successful if it is after a previous logout.
|
||||
|
||||
This is a regression test for #1440
|
||||
"""
|
||||
self.client.post( # login
|
||||
self.login_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
self.client.post( # logout
|
||||
reverse("counter:logout", kwargs={"counter_id": self.counter.id}),
|
||||
data={"user_id": self.barman.id},
|
||||
)
|
||||
response = self.client.post( # and re-login
|
||||
self.login_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.headers["HX-Redirect"] == self.detail_url
|
||||
response = self.client.get(
|
||||
self.detail_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
assert self.barman in response.wsgi_request.barmen
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_barman_timeout(client: Client):
|
||||
|
||||
@@ -61,7 +61,6 @@ class CounterLoginFragment(FragmentMixin, SingleObjectMixin, FormView):
|
||||
user = form.get_user()
|
||||
perm = self.object.permanencies.create(user=user, start=timezone.now())
|
||||
self.request.session.setdefault(SESSION_PERMANENCES_KEY, []).append(perm.id)
|
||||
self.request.session.modified = True
|
||||
self.success_url = reverse(
|
||||
"counter:details", kwargs={"counter_id": self.object.id}
|
||||
)
|
||||
|
||||
Generated
+7
-7
@@ -3962,9 +3962,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.15",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz",
|
||||
"integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==",
|
||||
"version": "3.3.16",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz",
|
||||
"integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4198,9 +4198,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.15",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz",
|
||||
"integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==",
|
||||
"version": "8.5.25",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz",
|
||||
"integrity": "sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4218,7 +4218,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.12",
|
||||
"nanoid": "^3.3.16",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ dependencies = [
|
||||
"django>=5.2.15,<6.0.0",
|
||||
"django-ninja>=1.6.2,<2.0.0",
|
||||
"django-ninja-extra>=0.31.5",
|
||||
"Pillow>=12.3.0,<13.0.0",
|
||||
"Pillow>=12.2.0,<13.0.0",
|
||||
"aemark>=0.1.1",
|
||||
"django-jinja<3.0.0,>=2.11.0",
|
||||
"cryptography>=49.0.0,<50.0.0",
|
||||
|
||||
Reference in New Issue
Block a user