Skip to content

Commit

Permalink
[#1570] disable logging except for errors and critical messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pi-sigma committed Sep 11, 2023
1 parent 35e3680 commit b9654a7
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 173 deletions.
1 change: 0 additions & 1 deletion .coverage.fedora.1089256.271783

This file was deleted.

1 change: 0 additions & 1 deletion src/open_inwoner/accounts/tests/test_auth_2fa_sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

from open_inwoner.configurations.models import SiteConfiguration
from open_inwoner.utils.logentry import LOG_ACTIONS
from open_inwoner.utils.validators import format_phone_number

from ..gateways import GatewayError
from .factories import UserFactory
Expand Down
3 changes: 0 additions & 3 deletions src/open_inwoner/accounts/tests/test_data_migrations.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from unittest import skip

from open_inwoner.utils.tests.test_migrations import TestMigrations


@skip("outdated")
class RemoveContactMigrationTests(TestMigrations):
app = "accounts"
migrate_from = "0048_auto_20221205_0921"
Expand Down
3 changes: 3 additions & 0 deletions src/open_inwoner/conf/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
Staging environment settings module.
This *should* be nearly identical to production.
"""
import logging
import os

logging.disable(logging.WARNING)

os.environ.setdefault("ENVIRONMENT", "test")
# NOTE: watch out for multiple projects using the same cache!
os.environ.setdefault("CACHE_DEFAULT", "127.0.0.1:6379/0")
Expand Down
7 changes: 1 addition & 6 deletions src/open_inwoner/haalcentraal/tests/test_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,10 @@ def test_user_is_not_updated_without_defining_service(self, m):
)
user.bsn = "999993847"

with self.assertLogs() as captured:
user.save()
user.save()

user.refresh_from_db()

self.assertEqual(
captured.records[1].getMessage(),
"no service defined for Haal Centraal",
)
self.assertEqual(user.first_name, "")
self.assertEqual(user.infix, "")
self.assertEqual(user.last_name, "")
Expand Down
48 changes: 0 additions & 48 deletions src/open_inwoner/openzaak/tests/test_logging.py

This file was deleted.

112 changes: 0 additions & 112 deletions src/open_inwoner/pdc/tests/test_data_migrations.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/open_inwoner/search/tests/test_search_products_boost.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.test import TestCase, tag
from django.test import TestCase

from open_inwoner.pdc.tests.factories import ProductFactory

Expand All @@ -7,7 +7,6 @@
from .utils import ESMixin


@tag("no-parallel")
class SearchBoostTests(ESMixin, TestCase):
def setUp(self):
super().setUp()
Expand Down

0 comments on commit b9654a7

Please sign in to comment.