Skip to content

Commit

Permalink
test: update create_project test to use random int in project name
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Mar 2, 2024
1 parent cc7df65 commit c5b8ac7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/tests/test_projects_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import uuid
from io import BytesIO
from pathlib import Path
from random import randint
from unittest.mock import Mock, patch

import pytest
Expand Down Expand Up @@ -56,7 +57,7 @@ async def test_create_project(client, admin_user, organisation):

project_data = {
"project_info": {
"name": "Test Project",
"name": f"Test Project {randint(1, 1000000)}",
"short_description": "test",
"description": "test",
},
Expand All @@ -81,6 +82,8 @@ async def test_create_project(client, admin_user, organisation):
f"/projects/create_project?org_id={organisation.id}", json=project_data
)

if response.status_code != 200:
log.error(response.json())
assert response.status_code == 200

response_data = response.json()
Expand Down

0 comments on commit c5b8ac7

Please sign in to comment.