allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 01/02: [#8333] add unicode test for GitLikeTree.__repr__ (related to timermiddleware fix; may be helpful during py3 upgrade changes)
Date Fri, 27 Sep 2019 14:51:59 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8333
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 37539cfde7b6950c1b3203431d2c66bcef32f8f8
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 7a4410a..8823b3a 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
@@ -60,6 +61,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