From c68e929ed03ba760bc3606012d444ba85fe3eb36 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 11 2016 09:14:51 +0000 Subject: Fix unit-tests We were retrieving the commit hash of the wrong repo then trying to look for it on the right page. This should fix that. --- diff --git a/tests/test_pagure_flask_ui_repo_slash_name.py b/tests/test_pagure_flask_ui_repo_slash_name.py index 4ecd2a3..349d7f8 100644 --- a/tests/test_pagure_flask_ui_repo_slash_name.py +++ b/tests/test_pagure_flask_ui_repo_slash_name.py @@ -239,11 +239,18 @@ class PagureFlaskSlashInNametests(tests.Modeltests): output.data) # Try accessing the commit - gitrepo = os.path.join(tests.HERE, 'repos', 'test.git') + gitrepo = os.path.join(tests.HERE, 'repos', 'forks/test.git') repo = pygit2.Repository(gitrepo) master_branch = repo.lookup_branch('master') first_commit = master_branch.get_object().hex + output = self.app.get('/forks/test/commits') + self.assertEqual(output.status_code, 200) + self.assertIn(first_commit, output.data) + self.assertIn( + 'Commit - forks/test ', output.data)