'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, 'project_template')
    args = ['startproject', '--template', template_path, '--extension=txt', 'customtestproject']
    testproject_dir = os.path.join(self.test_dir, '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, 'ticket-18091-non-ascii-template.txt')
    with codecs.open(path, 'r', encoding='utf-8') as f:
        self.assertEqual(f.read().splitlines(False), ['Some    non-ASCII    text    for    testing    ticket    #18091:', '\xc3\xbc\xc3\xa4\xc3\xb6    \xe2\x82\xac'])
