mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
14 lines
313 B
Python
14 lines
313 B
Python
"""Used by tests to ensure logging is kept when calling setup() twice."""
|
|
|
|
from unittest import mock
|
|
|
|
import configurations
|
|
|
|
print('setup_1')
|
|
configurations.setup()
|
|
|
|
with mock.patch('django.setup', side_effect=Exception('setup called twice')):
|
|
print('setup_2')
|
|
configurations.setup()
|
|
|
|
print('setup_done')
|