allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [allura] 07/08: [#8333] add unicode test for GitLikeTree.__repr__ (related to timermiddleware fix; may be helpful during py3 upgrade changes)
Date Tue, 28 Jan 2020 20:16:22 GMT
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 4d3a8c64dc15cd72a1402d2346a5f7e528db3cf7
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Fri Sep 27 10:35:31 2019 -0400

    [#8333] add unicode test for GitLikeTree.__repr__ (related to timermiddleware fix; may
be helpful during py3 upgrade changes)
---
 Allura/allura/tests/model/test_repo.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Allura/allura/tests/model/test_repo.py b/Allura/allura/tests/model/test_repo.py
index 4d77e67..f6f09bd 100644
--- a/Allura/allura/tests/model/test_repo.py
+++ b/Allura/allura/tests/model/test_repo.py
@@ -1,3 +1,4 @@
+# coding=utf-8
 #       Licensed to the Apache Software Foundation (ASF) under one
 #       or more contributor license agreements.  See the NOTICE file
 #       distributed with this work for additional information
@@ -61,6 +62,12 @@ class TestGitLikeTree(object):
         hex2 = tree2.hex()
         assert_equal(hex, hex2)
 
+    def test_hex_with_unicode(self):
+        tree = M.GitLikeTree()
+        tree.set_blob(u'/dir/f•º£', 'file-oid')
+        # the hex() value shouldn't change, it's an important key
+        assert_equal(tree.hex(), '51ce65bead2f6452da61d4f6f2e42f8648bf9e4b')
+
 
 class RepoImplTestBase(object):
     pass


Mime
View raw message