🔥 refactor(models): remove Token model and references to it to simplify the codebase and remove unused code

🔥 refactor(test_custom_component.py): remove unused fixture and imports to clean up the test file
🔧 chore(test_custom_component.py): update component fixture to include user_id parameter for testing purposes
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-25 15:19:13 -03:00
commit c268b2be17
4 changed files with 4 additions and 16 deletions

View file

@ -1,6 +1,5 @@
from .flow import Flow
from .user import User
from .token import Token
from .api_key import ApiKey
__all__ = ["Flow", "User", "Token", "ApiKey"]
__all__ = ["Flow", "User", "ApiKey"]

View file

@ -1,5 +0,0 @@
from .token import Token
__all__ = [
"Token",
]

View file

@ -1,7 +0,0 @@
from pydantic import BaseModel
class Token(BaseModel):
access_token: str
refresh_token: str
token_type: str

View file

@ -473,15 +473,16 @@ def test_build_config_no_code():
@pytest.fixture
def component():
def component(client, active_user):
return CustomComponent(
user_id=active_user.id,
field_config={
"fields": {
"llm": {"type": "str"},
"url": {"type": "str"},
"year": {"type": "int"},
}
}
},
)