fix: Apply black formatting to resolve CI formatting issues
Some checks failed
CI / test (3.10) (push) Failing after 1m21s
CI / test (3.11) (push) Failing after 1m19s
CI / test (3.9) (push) Failing after 1m22s
CI / lint (push) Failing after 43s

This commit is contained in:
CI Bot
2026-02-06 07:56:02 +00:00
parent 123a4f7d1d
commit d369d3b1f8
8 changed files with 75 additions and 39 deletions

View File

@@ -30,7 +30,9 @@ class JestGenerator:
self.output_dir = Path(output_dir)
self.mock_server_url = mock_server_url
self.env = Environment(
loader=FileSystemLoader(str(Path(__file__).parent.parent.parent / "templates" / "jest")),
loader=FileSystemLoader(
str(Path(__file__).parent.parent.parent / "templates" / "jest")
),
trim_blocks=True,
lstrip_blocks=True,
)
@@ -113,7 +115,7 @@ class JestGenerator:
endpoint_path = endpoint["path"]
endpoint_method = endpoint["method"]
test_code = f'''
test_code = f"""
describe('{describe_name}', () => {{
it('should {endpoint_method.upper()} {endpoint_path}', async () => {{
const response = await request(baseUrl)
@@ -122,7 +124,7 @@ describe('{describe_name}', () => {{
expect([200, 201, 204]).toContain(response.status);
}});
}});
'''
"""
return test_code
def _generate_test_name(self, endpoint: Dict[str, Any]) -> str:
@@ -161,7 +163,7 @@ describe('{describe_name}', () => {{
parts.append(f'{param_name}="test_{param_name}"')
elif param["in"] == "query":
parts.append(f'{param_name}')
parts.append(f"{param_name}")
if parts:
return ", {" + ", ".join(parts) + "}"