Add black code formatter

This commit is contained in:
Sascha Ißbrücker
2024-01-27 11:29:16 +01:00
parent 6775633be5
commit 98b9a9c1a0
128 changed files with 7181 additions and 4264 deletions

View File

@@ -14,23 +14,19 @@ class HealthViewTestCase(TestCase):
self.assertEqual(response.status_code, 200)
response_body = response.json()
expected_body = {
'version': app_version,
'status': 'healthy'
}
expected_body = {"version": app_version, "status": "healthy"}
self.assertDictEqual(response_body, expected_body)
def test_health_unhealhty(self):
with patch.object(connections['default'], 'ensure_connection') as mock_ensure_connection:
mock_ensure_connection.side_effect = Exception('Connection error')
with patch.object(
connections["default"], "ensure_connection"
) as mock_ensure_connection:
mock_ensure_connection.side_effect = Exception("Connection error")
response = self.client.get("/health")
self.assertEqual(response.status_code, 500)
response_body = response.json()
expected_body = {
'version': app_version,
'status': 'unhealthy'
}
expected_body = {"version": app_version, "status": "unhealthy"}
self.assertDictEqual(response_body, expected_body)