Skip to content

Commit 8c3987a

Browse files
committed
[#1570] disable logging except for errors and critical messages
1 parent 73f0888 commit 8c3987a

File tree

9 files changed

+6
-225
lines changed

9 files changed

+6
-225
lines changed

.coverage.fedora.1089256.271783

-1
This file was deleted.

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
16.8.1

src/open_inwoner/accounts/tests/test_auth_2fa_sms.py

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
from open_inwoner.configurations.models import SiteConfiguration
1919
from open_inwoner.utils.logentry import LOG_ACTIONS
20-
from open_inwoner.utils.validators import format_phone_number
2120

2221
from ..gateways import GatewayError
2322
from .factories import UserFactory

src/open_inwoner/accounts/tests/test_data_migrations.py

-55
This file was deleted.

src/open_inwoner/conf/ci.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{
1414
"django": {
1515
"handlers": ["django"],
16-
"level": "WARNING",
16+
"level": "ERROR",
1717
"propagate": True,
1818
},
1919
}

src/open_inwoner/conf/test.py

+3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
Staging environment settings module.
33
This *should* be nearly identical to production.
44
"""
5+
import logging
56
import os
67

8+
logging.disable(logging.WARNING)
9+
710
os.environ.setdefault("ENVIRONMENT", "test")
811
# NOTE: watch out for multiple projects using the same cache!
912
os.environ.setdefault("CACHE_DEFAULT", "127.0.0.1:6379/0")

src/open_inwoner/haalcentraal/tests/test_signal.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,10 @@ def test_user_is_not_updated_without_defining_service(self, m):
9191
)
9292
user.bsn = "999993847"
9393

94-
with self.assertLogs() as captured:
95-
user.save()
94+
user.save()
9695

9796
user.refresh_from_db()
9897

99-
self.assertEqual(
100-
captured.records[1].getMessage(),
101-
"no service defined for Haal Centraal",
102-
)
10398
self.assertEqual(user.first_name, "")
10499
self.assertEqual(user.infix, "")
105100
self.assertEqual(user.last_name, "")

src/open_inwoner/openzaak/tests/test_logging.py

-48
This file was deleted.

src/open_inwoner/pdc/tests/test_data_migrations.py

-112
This file was deleted.

0 commit comments

Comments
 (0)