mod: интерфейс (10) превью картинки. перед "скармливанием Гипоножабе"
This commit is contained in:
@@ -86,7 +86,7 @@ def generate_shape_def(shape: str, radius: int, shape_id: str) -> str:
|
||||
def generate_halftone_svg(
|
||||
image: Union[Image.Image, BinaryIO, bytes, str],
|
||||
*,
|
||||
cols: int = 80,
|
||||
cols: int = 35,
|
||||
max_radius: int = 8,
|
||||
shape: str = "circle",
|
||||
color: str = "#a855ff",
|
||||
|
||||
@@ -120,6 +120,9 @@ class HalftoneViewTests(TestCase):
|
||||
self.assertContains(response, 'id="preview"')
|
||||
self.assertContains(response, 'name="csrfmiddlewaretoken"')
|
||||
self.assertContains(response, 'X-CSRFToken')
|
||||
self.assertContains(response, "handleFileChange")
|
||||
self.assertContains(response, "imagePreviewUrl")
|
||||
self.assertContains(response, "Гипножаба облизывается на:")
|
||||
# Проверяем, что csrf_token не пустой в hx-headers
|
||||
content = response.content.decode("utf-8")
|
||||
self.assertNotIn('hx-headers=\'{"X-CSRFToken": ""}\'', content)
|
||||
|
||||
Reference in New Issue
Block a user