'Tests microsite.test_enable_microsites_pre_startup works as expected.'

def test_enable_microsites_pre_startup(self):

    settings.DEFAULT_TEMPLATE_ENGINE['DIRS'] = [path for path in settings.DEFAULT_TEMPLATE_ENGINE['DIRS'] if (path != settings.MICROSITE_ROOT_DIR)]
    with patch('microsite_configuration.backends.base.BaseMicrositeBackend.has_configuration_set', return_value=False):
        microsite.enable_microsites_pre_startup(log)
        self.assertNotIn(settings.MICROSITE_ROOT_DIR, settings.DEFAULT_TEMPLATE_ENGINE['DIRS'])
    with patch('microsite_configuration.backends.base.BaseMicrositeBackend.has_configuration_set', return_value=True):
        microsite.enable_microsites_pre_startup(log)
        self.assertIn(settings.MICROSITE_ROOT_DIR, settings.DEFAULT_TEMPLATE_ENGINE['DIRS'])
