snapshot: preserve session hardening and account surface

This commit is contained in:
Md Bayazid Bostame
2026-03-27 01:11:29 +01:00
parent bbc9b7b646
commit 8d228723f9
29 changed files with 825 additions and 42 deletions

View File

@@ -0,0 +1,26 @@
from django.contrib.auth import get_user_model
from django.test import Client, TestCase
class AccountUISmokeTests(TestCase):
def setUp(self):
self.user = get_user_model().objects.create_user(
username='profile-user',
email='profile@example.com',
password='secret-12345',
first_name='Profile',
last_name='User',
)
self.client = Client()
self.client.force_login(self.user)
def test_account_profile_page_renders(self):
response = self.client.get('/account/', HTTP_HOST='localhost')
self.assertEqual(response.status_code, 200)
self.assertContains(response, 'profile@example.com')
self.assertContains(response, 'Passwort ändern')
def test_password_change_page_renders(self):
response = self.client.get('/accounts/password_change/', HTTP_HOST='localhost')
self.assertEqual(response.status_code, 200)
self.assertContains(response, 'Aktuelles Passwort')