'Tests to make sure the is_comprehensive_theming_enabled function works as expected.
Here are different scenarios that we need to test
1. Theming is enabled, there is a SiteTheme record and microsite configuration for the current site.
is_comprehensive_theming_enabled should return True
2. Theming is enabled, there is no SiteTheme record but there is microsite configuration for the current site.
is_comprehensive_theming_enabled should return False
3. Theming is enabled, there is neither a SiteTheme record nor microsite configuration for the current site.
is_comprehensive_theming_enabled should return True
4. Theming is disabled, there is a SiteTheme record and microsite configuration for the current site.
is_comprehensive_theming_enabled should return False
5. Theming is disabled, there is no SiteTheme record but there is microsite configuration for the current site.
is_comprehensive_theming_enabled should return False
6. Theming is disabled, there is neither a SiteTheme record nor microsite configuration for the current site.
is_comprehensive_theming_enabled should return False'

def test_is_comprehensive_theming_enabled(self):

    with patch('openedx.core.djangoapps.theming.helpers.current_request_has_associated_site_theme', Mock(return_value=True)):
        with patch('openedx.core.djangoapps.theming.helpers.microsite.is_request_in_microsite', Mock(return_value=True)):
            self.assertTrue(theming_helpers.is_comprehensive_theming_enabled())
    with patch('openedx.core.djangoapps.theming.helpers.current_request_has_associated_site_theme', Mock(return_value=False)):
        with patch('openedx.core.djangoapps.theming.helpers.microsite.is_request_in_microsite', Mock(return_value=True)):
            self.assertFalse(theming_helpers.is_comprehensive_theming_enabled())
    with patch('openedx.core.djangoapps.theming.helpers.current_request_has_associated_site_theme', Mock(return_value=False)):
        with patch('openedx.core.djangoapps.theming.helpers.microsite.is_request_in_microsite', Mock(return_value=False)):
            self.assertTrue(theming_helpers.is_comprehensive_theming_enabled())
    with override_settings(ENABLE_COMPREHENSIVE_THEMING=False):
        with patch('openedx.core.djangoapps.theming.helpers.current_request_has_associated_site_theme', Mock(return_value=True)):
            with patch('openedx.core.djangoapps.theming.helpers.microsite.is_request_in_microsite', Mock(return_value=True)):
                self.assertFalse(theming_helpers.is_comprehensive_theming_enabled())
        with patch('openedx.core.djangoapps.theming.helpers.current_request_has_associated_site_theme', Mock(return_value=False)):
            with patch('openedx.core.djangoapps.theming.helpers.microsite.is_request_in_microsite', Mock(return_value=True)):
                self.assertFalse(theming_helpers.is_comprehensive_theming_enabled())
        with patch('openedx.core.djangoapps.theming.helpers.current_request_has_associated_site_theme', Mock(return_value=False)):
            with patch('openedx.core.djangoapps.theming.helpers.microsite.is_request_in_microsite', Mock(return_value=False)):
                self.assertFalse(theming_helpers.is_comprehensive_theming_enabled())
