From dcffc1739e1a1a3434940a0953f090395bd1d65b Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Thu, 22 Jan 2015 10:23:04 -0800 Subject: [PATCH] Make tests cope with random dict ordering --- gitosis/test/test_gitweb.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gitosis/test/test_gitweb.py b/gitosis/test/test_gitweb.py index 635e555..e38b881 100644 --- a/gitosis/test/test_gitweb.py +++ b/gitosis/test/test_gitweb.py @@ -63,10 +63,8 @@ def test_projectsList_multiple(): gitweb.generate_project_list_fp( config=cfg, fp=got) - eq(got.getvalue(), '''\ -quux -foo%2Fbar John+Doe -''') + eq(frozenset(got.getvalue().splitlines(True)), + frozenset(['quux\n', 'foo%2Fbar John+Doe\n'])) def test_projectsList_multiple_globalGitwebYes(): cfg = RawConfigParser() @@ -84,10 +82,8 @@ def test_projectsList_multiple_globalGitwebYes(): gitweb.generate_project_list_fp( config=cfg, fp=got) - eq(got.getvalue(), '''\ -quux -foo%2Fbar John+Doe -''') + eq(frozenset(got.getvalue().splitlines(True)), + frozenset(['quux\n', 'foo%2Fbar John+Doe\n'])) def test_projectsList_reallyEndsWithGit(): tmp = maketemp()