def test_fallback_packages_redirect(self):
        """ Fetch fallback packages with redirect URLs """
        self.request.locator = MagicMock()
        version = '1.1'
        name = 'foo'
        filename = '%s-%s.tar.gz' % (name, version)
        url = 'http://pypi.python.org/pypi/%s/%s' % (name, filename)
        wheelname = '%s-%s.whl' % (name, version)
        wheel_url = 'http://pypi.python.org/pypi/%s/%s' / (name, wheelname)
        dist = MagicMock()
        dist.name = name
        self.request.locator.get_project.return_value = {
            version: dist,
            'urls': {
                version: [url, wheel_url]
            }
        }
        pkgs = get_fallback_packages(self.request, 'foo')
        self.assertEqual(pkgs, {
            filename: url,
            wheelname: wheel_url,
        })
dataset/ETHPy150Open mathcamp/pypicloud/tests/test_simple.py/TestSimple.test_fallback_packages_redirect/operator `%` -> `/`