Skip to content

Commit

Permalink
Rename flaskapp to quartapp
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed Sep 11, 2023
1 parent 995e6ad commit 0147093
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ target-version = "py311"
line-length = 120
src = ["src"]

[tool.ruff.isort]
known-local-folder = ["src"]

[tool.black]
target-version = ["py311"]
line-length = 120
Expand Down
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from flaskapp import create_app
from quartapp import create_app

app = create_app()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import openai
import pytest
import pytest_asyncio
from src import flaskapp

from . import mock_cred
from src import quartapp


@pytest.fixture
Expand Down Expand Up @@ -40,7 +40,7 @@ async def client(monkeypatch, mock_openai_chatcompletion, mock_defaultazurecrede
monkeypatch.setenv("AZURE_OPENAI_ENDPOINT", "test-openai-service.openai.azure.com")
monkeypatch.setenv("AZURE_OPENAI_CHATGPT_DEPLOYMENT", "test-chatgpt")

quart_app = flaskapp.create_app()
quart_app = quartapp.create_app()

async with quart_app.test_app() as test_app:
quart_app.config.update({"TESTING": True})
Expand Down
6 changes: 3 additions & 3 deletions tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import openai
import pytest
from src import flaskapp

from . import mock_cred
from src import quartapp


@pytest.mark.asyncio
Expand Down Expand Up @@ -31,7 +31,7 @@ async def test_openai_key(monkeypatch):
monkeypatch.setenv("AZURE_OPENAI_ENDPOINT", "test-openai-service.openai.azure.com")
monkeypatch.setenv("AZURE_OPENAI_CHATGPT_DEPLOYMENT", "test-chatgpt")

quart_app = flaskapp.create_app()
quart_app = quartapp.create_app()

async with quart_app.test_app():
assert openai.api_type == "azure"
Expand All @@ -45,7 +45,7 @@ async def test_openai_managedidentity(monkeypatch):

monkeypatch.setattr("azure.identity.aio.ManagedIdentityCredential", mock_cred.MockAzureCredential)

quart_app = flaskapp.create_app()
quart_app = quartapp.create_app()

async with quart_app.test_app():
assert openai.api_type == "azure_ad"

0 comments on commit 0147093

Please sign in to comment.