From 046319fb7b0d6f29140799087a84f1552f878b46 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Jun 18 2021 13:15:36 +0000 Subject: Fix tests after expanded hash len in 0f7788b --- diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py index d71d571..e717419 100644 --- a/tests/test_pagure_flask_ui_fork.py +++ b/tests/test_pagure_flask_ui_fork.py @@ -291,7 +291,7 @@ class PagureFlaskForktests(tests.Modeltests): #' PR from the feature branch\n', # output_text) self.assertIn( - 'title="View file as of 2a552b">sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) # Test if the `open changed file icon` is displayed. @@ -359,7 +359,7 @@ class PagureFlaskForktests(tests.Modeltests): output_text, ) self.assertIn( - 'title="View file as of 2a552b">sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) # Un-authenticated user cannot see this checkbox self.assertNotIn( @@ -399,7 +399,7 @@ class PagureFlaskForktests(tests.Modeltests): output_text, ) self.assertIn( - 'title="View file as of 2a552b">sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) self.assertIn( 'sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) self.assertIn( 'sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) self.assertNotIn( 'sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) # Add a new commit on the repo from @@ -791,7 +791,7 @@ class PagureFlaskForktests(tests.Modeltests): #' PR from the feature branch\n', # output_text) self.assertIn( - 'title="View file as of 2a552b">sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) # Wrong project @@ -1254,7 +1254,7 @@ class PagureFlaskForktests(tests.Modeltests): output_text = output.get_data(as_text=True) self.assertIsNotNone(re.search(MERGED_PATTERN, output_text)) self.assertIn( - 'title="View file as of 2a552b">sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) @patch("pagure.lib.notify.send_email") @@ -7129,7 +7129,7 @@ More information output_text, ) self.assertIn( - 'title="View file as of 2a552b">sources', output_text + 'title="View file as of 2a552bb">sources', output_text ) # Wrong project diff --git a/tests/test_pagure_flask_ui_old_commit.py b/tests/test_pagure_flask_ui_old_commit.py index 69f2e0d..906c0b5 100644 --- a/tests/test_pagure_flask_ui_old_commit.py +++ b/tests/test_pagure_flask_ui_old_commit.py @@ -83,7 +83,7 @@ class PagureFlaskRepoOldUrltests(tests.SimplePagureTest): ) self.assertTrue( - 'title="View file as of %s"' % commit.oid.hex[0:6] + 'title="View file as of %s"' % commit.oid.hex[0:7] in output.get_data(as_text=True) ) @@ -168,7 +168,7 @@ class PagureFlaskRepoOldUrltests(tests.SimplePagureTest): ) self.assertTrue( - 'title="View file as of %s"' % commit.oid.hex[0:6] + 'title="View file as of %s"' % commit.oid.hex[0:7] in output.get_data(as_text=True) ) diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py index 460dd63..f1abd91 100644 --- a/tests/test_pagure_flask_ui_repo.py +++ b/tests/test_pagure_flask_ui_repo.py @@ -2827,7 +2827,7 @@ class PagureFlaskRepotests(tests.Modeltests): ) self.assertIn('1 more commits...', output_text) self.assertIn( - 'title="View file as of 4829cf">Šource', output_text + 'title="View file as of 4829cfa">Šource', output_text ) self.assertIn( '
\n' @@ -2859,7 +2859,7 @@ class PagureFlaskRepotests(tests.Modeltests): ) self.assertIn('1 more commits...', output_text) self.assertIn( - 'title="View file as of 000000">Šource', output_text + 'title="View file as of 0000000">Šource', output_text ) self.assertIn( '
\n'