X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/680cbe3a4fef175e3b4cac32641134de79c5c0ce..07b68e2425d2caadc2edf8fe021f60a32c6f44a7:/tests/test_blackd.py?ds=sidebyside diff --git a/tests/test_blackd.py b/tests/test_blackd.py index 18b2c98..1d12113 100644 --- a/tests/test_blackd.py +++ b/tests/test_blackd.py @@ -167,6 +167,13 @@ class BlackDTestCase(AioHTTPTestCase): ) self.assertEqual(response.status, 400) + @unittest_run_loop + async def test_blackd_preview(self) -> None: + response = await self.client.post( + "/", data=b'print("hello")\n', headers={blackd.PREVIEW: "true"} + ) + self.assertEqual(response.status, 204) + @unittest_run_loop async def test_blackd_response_black_version_header(self) -> None: response = await self.client.post("/")