Fixes: 1) Correct entrypoint scripts by removing redundant `python` reference in `uv run` commands; 2) Resolve incorrect imports and adjust class renaming in vibes_auth tests; 3) Address typing errors and minor omissions in existing code. Extra: 1) Improve formatting in settings and middleware files; 2) Update messaging test class names for clarity; 3) Cleanup unused imports and extra whitespaces, ensuring cleaner codebase.
15 lines
543 B
Python
15 lines
543 B
Python
from typing import Any
|
|
|
|
from django.test import TestCase
|
|
from django.urls import reverse
|
|
|
|
|
|
class GraphQLPaymentsTests(TestCase):
|
|
def graphql(self, query: str, variables: dict | None = None):
|
|
url = reverse("graphql-platform")
|
|
payload: dict[str, Any] = {"query": query}
|
|
if variables:
|
|
payload["variables"] = variables
|
|
response = self.client.post(url, data=payload, content_type="application/json")
|
|
self.assertEqual(response.status_code, 200, response.json())
|
|
return response.json()
|