Files
workdock-platform/backend/workflows/tests/test_account_ui.py
2026-03-27 01:11:29 +01:00

27 lines
1011 B
Python

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')