Mercurial > kallithea
changeset 8205:1c64d9bd0599
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 28 Dec 2019 18:21:50 +0100 |
parents | 98f007b3fd9a |
children | 7172f3b0042b |
files | kallithea/tests/vcs/test_filenodes_unicode_path.py |
diffstat | 1 files changed, 4 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/tests/vcs/test_filenodes_unicode_path.py Thu Dec 26 15:21:51 2019 +0100 +++ b/kallithea/tests/vcs/test_filenodes_unicode_path.py Sat Dec 28 18:21:50 2019 +0100 @@ -8,29 +8,22 @@ 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 <joe.doe@example.com>', '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):