mirror of
https://github.com/wekan/wekan.git
synced 2026-01-29 12:46:09 +01:00
Refactor logging messages in e2e workflow and test files for improved clarity
This commit is contained in:
parent
26ae280fe3
commit
63596b1fbd
3 changed files with 10 additions and 32 deletions
|
|
@ -14,9 +14,7 @@ class TestBoard:
|
|||
}
|
||||
|
||||
response = requests.post(f"{base_url}/users/login", data=login_data)
|
||||
print(f"URL:{base_url}/users/login")
|
||||
print(f"🔑 Login response status: {response.status_code}, body: {response.text}")
|
||||
# print("response_JSON:", response.json())
|
||||
|
||||
if response.status_code == 200:
|
||||
json_response = response.json()
|
||||
if 'token' in json_response:
|
||||
|
|
@ -33,24 +31,6 @@ class TestBoard:
|
|||
response = requests.get(f"{base_url}")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_get_user_boards(self):
|
||||
"""Test getting information about boards of user"""
|
||||
if not self.auth_token:
|
||||
pytest.skip("No authentication token available")
|
||||
|
||||
response = requests.get(
|
||||
f"{base_url}/api/users/{self.user_id}/boards",
|
||||
headers={"Authorization": f"Bearer {self.auth_token}"}
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
# Should return a list of boards
|
||||
boards_data = response.json()
|
||||
assert isinstance(boards_data, list), "Response should be a list of boards"
|
||||
assert "title" in boards_data[0], "First board object should have a 'title' key"
|
||||
|
||||
def test_create_board_minimal(self):
|
||||
"""Test creating a board with minimal required fields"""
|
||||
if not self.auth_token:
|
||||
|
|
@ -196,7 +176,5 @@ class TestBoard:
|
|||
headers={"Authorization": f"Bearer {self.auth_token}"}
|
||||
)
|
||||
|
||||
print(f"📋 Get boards API status: {response.json()}")
|
||||
|
||||
# Should work with authentication
|
||||
assert response.status_code in [200, 204]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue