61 lines
1.5 KiB
Python
61 lines
1.5 KiB
Python
"""Test user definitions for E2E authentication testing"""
|
|
|
|
|
|
class TestUsers:
|
|
"""Class containing test user data"""
|
|
|
|
# Admin user (automatically created on startup)
|
|
ADMIN = {
|
|
"email": "test.admin@test.com",
|
|
"password": "TestAdmin123"
|
|
}
|
|
|
|
# Regular user to create for certain tests
|
|
REGULAR_USER = {
|
|
"username": "testuser",
|
|
"email": "user@test.com",
|
|
"password": "TestUser123"
|
|
}
|
|
|
|
# Failed authentication test cases
|
|
INVALID_CREDENTIALS = [
|
|
{
|
|
"name": "wrong_password",
|
|
"email": "test.admin@test.com",
|
|
"password": "wrongpass",
|
|
"expected_error": "Invalid email or password"
|
|
},
|
|
{
|
|
"name": "nonexistent_user",
|
|
"email": "nonexistent@test.com",
|
|
"password": "TestAdmin123",
|
|
"expected_error": "Invalid email or password"
|
|
},
|
|
{
|
|
"name": "invalid_email_format",
|
|
"email": "invalid.email",
|
|
"password": "TestAdmin123",
|
|
"expected_error": "Invalid email or password"
|
|
},
|
|
{
|
|
"name": "empty_email",
|
|
"email": "",
|
|
"password": "TestAdmin123",
|
|
"expected_error": "Email and password are required"
|
|
},
|
|
{
|
|
"name": "empty_password",
|
|
"email": "test.admin@test.com",
|
|
"password": "",
|
|
"expected_error": "Email and password are required"
|
|
}
|
|
]
|
|
|
|
# Protected URLs to test for unauthorized access
|
|
PROTECTED_URLS = [
|
|
"/",
|
|
"/admin",
|
|
"/repositories",
|
|
"/workflows",
|
|
"/applications"
|
|
] |