Beispiel #1
0
def pytest_configure(config):
    import django
    # Forcefully call `django.setup`, pytest-django tries to be very lazy
    # and doesn't call it if it has already been setup.
    # That is problematic for us since we overwrite our logging config
    # in settings_test and it can happen that django get's initialized
    # with the wrong configuration. So let's forcefully re-initialize
    # to setup the correct logging config since at this point
    # DJANGO_SETTINGS_MODULE should be `settings_test` every time.
    django.setup()

    from olympia.amo.tests import prefix_indexes
    prefix_indexes(config)
def pytest_configure(config):
    import django
    # Forcefully call `django.setup`, pytest-django tries to be very lazy
    # and doesn't call it if it has already been setup.
    # That is problematic for us since we overwrite our logging config
    # in settings_test and it can happen that django get's initialized
    # with the wrong configuration. So let's forcefully re-initialize
    # to setup the correct logging config since at this point
    # DJANGO_SETTINGS_MODULE should be `settings_test` every time.
    django.setup()

    from olympia.amo.tests import prefix_indexes
    prefix_indexes(config)
Beispiel #3
0
def pytest_configure(config):
    from olympia.amo.tests import prefix_indexes
    prefix_indexes(config)
def pytest_configure(config):
    from olympia.amo.tests import prefix_indexes

    prefix_indexes(config)