Skip to content

Commit 7118d58

Browse files
committed
Reformatted tests
1 parent 43a78a3 commit 7118d58

10 files changed

Lines changed: 24 additions & 57 deletions

File tree

tests/e2e/features/steps/llm_query_response.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from behave.runner import Context
77
from tests.e2e.utils.utils import replace_placeholders
88

9-
109
DEFAULT_LLM_TIMEOUT = 60
1110

1211

tests/integration/endpoints/test_rlsapi_v1_integration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from tests.unit.utils.auth_helpers import mock_authorization_resolvers
3333
from utils.suid import check_suid
3434

35-
3635
# ==========================================
3736
# Shared Fixtures
3837
# ==========================================

tests/unit/app/endpoints/test_a2a.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from configuration import AppConfig
4040
from models.config import Action
4141

42-
4342
# User ID must be proper UUID
4443
MOCK_AUTH = (
4544
"00000001-0001-0001-0001-000000000001",

tests/unit/app/endpoints/test_streaming_query.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from tests.unit.utils.auth_helpers import mock_authorization_resolvers
4444
from utils.token_counter import TokenCounter
4545

46-
4746
# Note: content_delta module doesn't exist in llama-stack-client 0.3.x
4847
# These are mock classes for backward compatibility with Agent API tests
4948
# pylint: disable=too-few-public-methods,redefined-builtin

tests/unit/authentication/test_api_key_token.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
"""Unit tests for functions defined in authentication/api_key_token.py"""
44

5-
65
import pytest
76
from fastapi import HTTPException, Request
87
from pydantic import SecretStr

tests/unit/cache/test_postgres_cache.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from cache.cache_error import CacheError
1919
from cache.postgres_cache import PostgresCache
2020

21-
2221
USER_ID_1 = suid.get_suid()
2322
USER_ID_2 = suid.get_suid()
2423
CONVERSATION_ID_1 = suid.get_suid()

tests/unit/models/rlsapi/test_requests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
RlsapiV1Terminal,
1616
)
1717

18-
1918
# ---------------------------------------------------------------------------
2019
# Fixtures
2120
# ---------------------------------------------------------------------------

tests/unit/models/rlsapi/test_responses.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
)
1313
from models.responses import AbstractSuccessfulResponse
1414

15-
1615
# ---------------------------------------------------------------------------
1716
# Fixtures
1817
# ---------------------------------------------------------------------------

tests/unit/test_configuration.py

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ def test_load_proper_configuration(tmpdir: Path) -> None:
251251
"""Test loading proper configuration from YAML file."""
252252
cfg_filename = tmpdir / "config.yaml"
253253
with open(cfg_filename, "w", encoding="utf-8") as fout:
254-
fout.write(
255-
"""
254+
fout.write("""
256255
name: foo bar baz
257256
service:
258257
host: localhost
@@ -268,8 +267,7 @@ def test_load_proper_configuration(tmpdir: Path) -> None:
268267
user_data_collection:
269268
feedback_enabled: false
270269
mcp_servers: []
271-
"""
272-
)
270+
""")
273271

274272
cfg = AppConfig()
275273
cfg.load_configuration(str(cfg_filename))
@@ -283,8 +281,7 @@ def test_load_configuration_with_mcp_servers(tmpdir: Path) -> None:
283281
"""Test loading configuration from YAML file with MCP servers."""
284282
cfg_filename = tmpdir / "config.yaml"
285283
with open(cfg_filename, "w", encoding="utf-8") as fout:
286-
fout.write(
287-
"""
284+
fout.write("""
288285
name: test service
289286
service:
290287
host: localhost
@@ -305,8 +302,7 @@ def test_load_configuration_with_mcp_servers(tmpdir: Path) -> None:
305302
- name: git-server
306303
provider_id: custom-git-provider
307304
url: https://git.example.com/mcp
308-
"""
309-
)
305+
""")
310306

311307
cfg = AppConfig()
312308
cfg.load_configuration(str(cfg_filename))
@@ -447,8 +443,7 @@ def test_load_configuration_with_customization_system_prompt_path(tmpdir: Path)
447443

448444
cfg_filename = tmpdir / "config.yaml"
449445
with open(cfg_filename, "w", encoding="utf-8") as fout:
450-
fout.write(
451-
f"""
446+
fout.write(f"""
452447
name: test service
453448
service:
454449
host: localhost
@@ -472,8 +467,7 @@ def test_load_configuration_with_customization_system_prompt_path(tmpdir: Path)
472467
customization:
473468
disable_query_system_prompt: true
474469
system_prompt_path: {system_prompt_filename}
475-
"""
476-
)
470+
""")
477471

478472
cfg = AppConfig()
479473
cfg.load_configuration(str(cfg_filename))
@@ -487,8 +481,7 @@ def test_load_configuration_with_customization_system_prompt(tmpdir: Path) -> No
487481
"""Test loading configuration from YAML file with system_prompt in the customization."""
488482
cfg_filename = tmpdir / "config.yaml"
489483
with open(cfg_filename, "w", encoding="utf-8") as fout:
490-
fout.write(
491-
"""
484+
fout.write("""
492485
name: test service
493486
service:
494487
host: localhost
@@ -512,8 +505,7 @@ def test_load_configuration_with_customization_system_prompt(tmpdir: Path) -> No
512505
customization:
513506
system_prompt: |-
514507
this is system prompt in the customization section
515-
"""
516-
)
508+
""")
517509

518510
cfg = AppConfig()
519511
cfg.load_configuration(str(cfg_filename))
@@ -532,8 +524,7 @@ def test_configuration_with_profile_customization(tmpdir: Path) -> None:
532524
expected_prompts = expected_profile.get_prompts()
533525
cfg_filename = tmpdir / "config.yaml"
534526
with open(cfg_filename, "w", encoding="utf-8") as fout:
535-
fout.write(
536-
"""
527+
fout.write("""
537528
name: test service
538529
service:
539530
host: localhost
@@ -550,8 +541,7 @@ def test_configuration_with_profile_customization(tmpdir: Path) -> None:
550541
feedback_enabled: false
551542
customization:
552543
profile_path: tests/profiles/test/profile.py
553-
"""
554-
)
544+
""")
555545

556546
cfg = AppConfig()
557547
cfg.load_configuration(str(cfg_filename))
@@ -575,8 +565,7 @@ def test_configuration_with_all_customizations(tmpdir: Path) -> None:
575565

576566
cfg_filename = tmpdir / "config.yaml"
577567
with open(cfg_filename, "w", encoding="utf-8") as fout:
578-
fout.write(
579-
f"""
568+
fout.write(f"""
580569
name: test service
581570
service:
582571
host: localhost
@@ -595,8 +584,7 @@ def test_configuration_with_all_customizations(tmpdir: Path) -> None:
595584
profile_path: tests/profiles/test/profile.py
596585
system_prompt: custom prompt
597586
system_prompt_path: {system_prompt_filename}
598-
"""
599-
)
587+
""")
600588

601589
cfg = AppConfig()
602590
cfg.load_configuration(str(cfg_filename))
@@ -614,8 +602,7 @@ def test_configuration_with_sqlite_conversation_cache(tmpdir: Path) -> None:
614602
"""Test loading configuration from YAML file with conversation cache configuration."""
615603
cfg_filename = tmpdir / "config.yaml"
616604
with open(cfg_filename, "w", encoding="utf-8") as fout:
617-
fout.write(
618-
"""
605+
fout.write("""
619606
name: test service
620607
service:
621608
host: localhost
@@ -634,8 +621,7 @@ def test_configuration_with_sqlite_conversation_cache(tmpdir: Path) -> None:
634621
type: "sqlite"
635622
sqlite:
636623
db_path: ":memory:"
637-
"""
638-
)
624+
""")
639625

640626
cfg = AppConfig()
641627
cfg.load_configuration(str(cfg_filename))
@@ -653,8 +639,7 @@ def test_configuration_with_in_memory_conversation_cache(tmpdir: Path) -> None:
653639
"""Test loading configuration from YAML file with conversation cache configuration."""
654640
cfg_filename = tmpdir / "config.yaml"
655641
with open(cfg_filename, "w", encoding="utf-8") as fout:
656-
fout.write(
657-
"""
642+
fout.write("""
658643
name: test service
659644
service:
660645
host: localhost
@@ -673,8 +658,7 @@ def test_configuration_with_in_memory_conversation_cache(tmpdir: Path) -> None:
673658
type: "memory"
674659
memory:
675660
max_entries: 42
676-
"""
677-
)
661+
""")
678662

679663
cfg = AppConfig()
680664
cfg.load_configuration(str(cfg_filename))
@@ -692,8 +676,7 @@ def test_configuration_with_quota_handlers_no_storage(tmpdir: Path) -> None:
692676
"""Test loading configuration from YAML file with quota handlers configuration."""
693677
cfg_filename = tmpdir / "config.yaml"
694678
with open(cfg_filename, "w", encoding="utf-8") as fout:
695-
fout.write(
696-
"""
679+
fout.write("""
697680
name: test service
698681
service:
699682
host: localhost
@@ -723,8 +706,7 @@ def test_configuration_with_quota_handlers_no_storage(tmpdir: Path) -> None:
723706
scheduler:
724707
# scheduler ticks in seconds
725708
period: 1
726-
"""
727-
)
709+
""")
728710

729711
cfg = AppConfig()
730712
cfg.load_configuration(str(cfg_filename))
@@ -746,8 +728,7 @@ def test_configuration_with_quota_handlers(tmpdir: Path) -> None:
746728
"""Test loading configuration from YAML file with quota handlers configuration."""
747729
cfg_filename = tmpdir / "config.yaml"
748730
with open(cfg_filename, "w", encoding="utf-8") as fout:
749-
fout.write(
750-
"""
731+
fout.write("""
751732
name: test service
752733
service:
753734
host: localhost
@@ -779,8 +760,7 @@ def test_configuration_with_quota_handlers(tmpdir: Path) -> None:
779760
scheduler:
780761
# scheduler ticks in seconds
781762
period: 1
782-
"""
783-
)
763+
""")
784764

785765
cfg = AppConfig()
786766
cfg.load_configuration(str(cfg_filename))
@@ -813,8 +793,7 @@ def test_load_configuration_with_azure_entra_id(tmpdir: Path) -> None:
813793
"""Return Azure Entra ID configuration when provided in configuration."""
814794
cfg_filename = tmpdir / "config.yaml"
815795
with open(cfg_filename, "w", encoding="utf-8") as fout:
816-
fout.write(
817-
"""
796+
fout.write("""
818797
name: test service
819798
service:
820799
host: localhost
@@ -833,8 +812,7 @@ def test_load_configuration_with_azure_entra_id(tmpdir: Path) -> None:
833812
tenant_id: tenant
834813
client_id: client
835814
client_secret: secret
836-
"""
837-
)
815+
""")
838816

839817
cfg = AppConfig()
840818
cfg.load_configuration(str(cfg_filename))
@@ -850,8 +828,7 @@ def test_load_configuration_with_incomplete_azure_entra_id_raises(tmpdir: Path)
850828
"""Raise error if Azure Entra ID block is incomplete in configuration."""
851829
cfg_filename = tmpdir / "config.yaml"
852830
with open(cfg_filename, "w", encoding="utf-8") as fout:
853-
fout.write(
854-
"""
831+
fout.write("""
855832
name: test service
856833
service:
857834
host: localhost
@@ -869,8 +846,7 @@ def test_load_configuration_with_incomplete_azure_entra_id_raises(tmpdir: Path)
869846
azure_entra_id:
870847
tenant_id: tenant
871848
client_id: client
872-
"""
873-
)
849+
""")
874850

875851
cfg = AppConfig()
876852
with pytest.raises(ValidationError):

tests/unit/test_llama_stack_configuration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
InferenceConfiguration,
2020
)
2121

22-
2322
# =============================================================================
2423
# Test construct_vector_dbs_section
2524
# =============================================================================

0 commit comments

Comments
 (0)