# HG changeset patch # User Mads Kiilerich # Date 2019-12-28 18:21:50 # Node ID 1c64d9bd0599af5cace25070da5aa662bc0cdbdd # Parent 98f007b3fd9a70f07fcbedd581bacde48fbb3275 tests: update test_filenode_path for py3 Unicode is now handled very differently. There are no encoded unicode str, and the test barely makes sense any more. diff --git a/kallithea/tests/vcs/test_filenodes_unicode_path.py b/kallithea/tests/vcs/test_filenodes_unicode_path.py --- a/kallithea/tests/vcs/test_filenodes_unicode_path.py +++ b/kallithea/tests/vcs/test_filenodes_unicode_path.py @@ -8,29 +8,22 @@ from kallithea.tests.vcs.base import _Ba class FileNodeUnicodePathTestsMixin(_BackendTestMixin): - fname = 'ąśðąęłąć.txt' - ufname = (fname).decode('utf-8') + fname = u'ąśðąęłąć.txt' @classmethod def _get_commits(cls): - cls.nodes = [ - FileNode(cls.fname, content='Foobar'), - ] - - commits = [ + return [ { 'message': 'Initial commit', 'author': 'Joe Doe ', 'date': datetime.datetime(2010, 1, 1, 20), - 'added': cls.nodes, + 'added': [FileNode(cls.fname, content='Foobar')], }, ] - return commits def test_filenode_path(self): node = self.tip.get_node(self.fname) - unode = self.tip.get_node(self.ufname) - assert node == unode + assert node.path == self.fname class TestGitFileNodeUnicodePath(FileNodeUnicodePathTestsMixin):