Skip to content

Commit

Permalink
maybe fixing tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed Nov 4, 2024
1 parent 15c40f1 commit 72a07a6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,10 @@ def test_initialize_project_use_existing_project_no_projects(tmp_dir_cwd: Path,
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/organizations/', json=[{'organization_name': 'fake_org'}]
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/info',
json={'project_name': 'myproject', 'project_url': 'fake_project_url'},
)
create_project_response = {
'json': {
'project_name': 'myproject',
Expand Down Expand Up @@ -934,6 +938,10 @@ def test_initialize_project_use_existing_project(tmp_dir_cwd: Path, tmp_path: Pa
'https://logfire-api.pydantic.dev/v1/projects/',
json=[{'organization_name': 'fake_org', 'project_name': 'fake_project'}],
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/info',
json={'project_name': 'myproject', 'project_url': 'fake_project_url'},
)
create_project_response = {
'json': {
'project_name': 'myproject',
Expand Down Expand Up @@ -986,6 +994,10 @@ def test_initialize_project_not_using_existing_project(
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/organizations/', json=[{'organization_name': 'fake_org'}]
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/info',
json={'project_name': 'myproject', 'project_url': 'fake_project_url'},
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/projects/',
json=[{'organization_name': 'fake_org', 'project_name': 'fake_project'}],
Expand Down Expand Up @@ -1078,6 +1090,10 @@ def test_initialize_project_create_project(tmp_dir_cwd: Path, tmp_path: Path, ca
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/organizations/', json=[{'organization_name': 'fake_org'}]
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/info',
json={'project_name': 'myproject', 'project_url': 'fake_project_url'},
)

create_existing_project_request_json = {
'project_name': 'existingprojectname',
Expand Down Expand Up @@ -1186,6 +1202,10 @@ def test_initialize_project_create_project_default_organization(tmp_dir_cwd: Pat
'https://logfire-api.pydantic.dev/v1/organizations/',
json=[{'organization_name': 'fake_org'}, {'organization_name': 'fake_org1'}],
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/info',
json={'project_name': 'myproject', 'project_url': 'fake_project_url'},
)
request_mocker.get(
'https://logfire-api.pydantic.dev/v1/account/me',
json={'default_organization': {'organization_name': 'fake_org1'}},
Expand Down

0 comments on commit 72a07a6

Please sign in to comment.