'Startproject management command handles project template tar/zip balls from non-canonical urls'

def test_project_template_tarball_url(self):

    template_url = (u'%s/admin_scripts/custom_templates/project_template.tgz/' % self.live_server_url)
    args = [u'startproject', u'--template', template_url, u'urltestproject']
    testproject_dir = os.path.join(test_dir, u'urltestproject')
    self.addCleanup(shutil.rmtree, testproject_dir, True)
    (out, err) = self.run_django_admin(args)
    self.assertNoOutput(err)
    self.assertTrue(os.path.isdir(testproject_dir))
    self.assertTrue(os.path.exists(os.path.join(testproject_dir, u'run.py')))
