'Verify storage returns correct url depending upon the enabled theme'

@override_settings(DEBUG=True)
@ddt.data(('images/logo.png',), ('images/favicon.ico',))
@ddt.unpack
def test_url(self, asset):

    with patch('openedx.core.djangoapps.theming.storage.get_current_theme', return_value=Theme(self.enabled_theme, self.enabled_theme, get_theme_base_dir(self.enabled_theme))):
        asset_url = self.storage.url(asset)
        asset_url = re.sub('(\\.\\w+)(\\.png|\\.ico)$', '\\g<2>', asset_url)
        expected_url = (((self.storage.base_url + self.enabled_theme) + '/') + asset)
        self.assertEqual(asset_url, expected_url)
