'Tests to make sure the get_template_path function works as expected.'

def test_get_template_path(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)):
            with patch('microsite_configuration.microsite.TEMPLATES_BACKEND') as mock_microsite_backend:
                mock_microsite_backend.get_template = Mock(return_value='/microsite/about.html')
                self.assertEqual(theming_helpers.get_template_path('about.html'), 'about.html')
    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)):
            with patch('microsite_configuration.microsite.TEMPLATES_BACKEND') as mock_microsite_backend:
                mock_microsite_backend.get_template_path = Mock(return_value='/microsite/about.html')
                self.assertEqual(theming_helpers.get_template_path('about.html'), '/microsite/about.html')
