'Ticket 18091: Make sure the startproject management command is able to render templates with non-ASCII content'

def test_custom_project_template_with_non_ascii_templates(self):

    template_path = os.path.join(custom_templates_dir, u'project_template')
    args = [u'startproject', u'--template', template_path, u'--extension=txt', u'customtestproject']
    testproject_dir = os.path.join(test_dir, u'customtestproject')
    self.addCleanup(shutil.rmtree, testproject_dir, True)
    (out, err) = self.run_django_admin(args)
    self.assertNoOutput(err)
    self.assertTrue(os.path.isdir(testproject_dir))
    path = os.path.join(testproject_dir, u'ticket-18091-non-ascii-template.txt')
    with codecs.open(path, u'r', encoding=u'utf-8') as f:
        self.assertEqual(f.read().splitlines(False), [u'Some    non-ASCII    text    for    testing    ticket    #18091:', u'\xfc\xe4\xf6    \u20ac'])
