Format Python code with black

This commit is contained in:
kpj
2022-02-27 15:26:41 +01:00
parent f0ffc69010
commit c56cb25b5f
136 changed files with 6142 additions and 3811 deletions

View File

@@ -9,7 +9,6 @@ from paperless.checks import debug_mode_check
class TestChecks(DirectoriesMixin, TestCase):
def test_binaries(self):
self.assertEqual(binaries_check(None), [])
@@ -20,9 +19,9 @@ class TestChecks(DirectoriesMixin, TestCase):
def test_paths_check(self):
self.assertEqual(paths_check(None), [])
@override_settings(MEDIA_ROOT="uuh",
DATA_DIR="whatever",
CONSUMPTION_DIR="idontcare")
@override_settings(
MEDIA_ROOT="uuh", DATA_DIR="whatever", CONSUMPTION_DIR="idontcare"
)
def test_paths_check_dont_exist(self):
msgs = paths_check(None)
self.assertEqual(len(msgs), 3, str(msgs))

View File

@@ -8,14 +8,13 @@ from paperless.asgi import application
TEST_CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels.layers.InMemoryChannelLayer',
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer",
},
}
class TestWebSockets(TestCase):
@override_settings(CHANNEL_LAYERS=TEST_CHANNEL_LAYERS)
async def test_no_auth(self):
communicator = WebsocketCommunicator(application, "/ws/status/")
@@ -43,15 +42,12 @@ class TestWebSockets(TestCase):
connected, subprotocol = await communicator.connect()
self.assertTrue(connected)
message = {
"task_id": "test"
}
message = {"task_id": "test"}
channel_layer = get_channel_layer()
await channel_layer.group_send("status_updates", {
"type": "status_update",
"data": message
})
await channel_layer.group_send(
"status_updates", {"type": "status_update", "data": message}
)
response = await communicator.receive_json_from()