Changeset - 1c64d9bd0599
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 6 years ago 2019-12-28 18:21:50
mads@kiilerich.com
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.
1 file changed with 4 insertions and 11 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/vcs/test_filenodes_unicode_path.py
Show inline comments
 
@@ -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 <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):
0 comments (0 inline, 0 general)