From 6e6a42387be95a47ebe27840b3b748cf48019731 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 27 2015 14:36:36 +0000 Subject: Adjust unit-tests for the change in the title of the pull-request/diff pages --- diff --git a/tests/test_progit_flask_ui_fork.py b/tests/test_progit_flask_ui_fork.py index 24e499f..e26f170 100644 --- a/tests/test_progit_flask_ui_fork.py +++ b/tests/test_progit_flask_ui_fork.py @@ -231,7 +231,8 @@ class PagureFlaskForktests(tests.Modeltests): output = self.app.get('/test/pull-request/1') self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( 'title="View file as of 2a552b">View', output.data) @@ -255,7 +256,8 @@ class PagureFlaskForktests(tests.Modeltests): '/test/pull-request/1/merge', data={}, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( 'title="View file as of 2a552b">View', output.data) @@ -310,8 +312,8 @@ class PagureFlaskForktests(tests.Modeltests): '/test/pull-request/1/merge', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • This request must be assigned to be merged
  • ', output.data) @@ -327,8 +329,8 @@ class PagureFlaskForktests(tests.Modeltests): '/test/pull-request/1/merge', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • Only the assignee can merge this review
  • ', output.data) @@ -344,8 +346,8 @@ class PagureFlaskForktests(tests.Modeltests): '/test/pull-request/1/merge', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • This request does not have the minimum ' 'review score necessary to be merged
  • ', output.data) @@ -425,8 +427,8 @@ class PagureFlaskForktests(tests.Modeltests): '/test/pull-request/1/merge', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • Merge conflicts!
  • ', output.data) @@ -459,7 +461,8 @@ class PagureFlaskForktests(tests.Modeltests): '/test/pull-request/1/merge', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', output.data) + 'PR#1: PR from the master branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • Nothing to do, changes were already ' 'merged
  • ', output.data) @@ -474,7 +477,8 @@ class PagureFlaskForktests(tests.Modeltests): output = self.app.get('/test/pull-request/1') self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( 'Merged by', output.data) self.assertIn( @@ -577,7 +581,8 @@ class PagureFlaskForktests(tests.Modeltests): output = self.app.get('/test/pull-request/1') self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertTrue(output.data.count(''), 1) shutil.rmtree(newpath) @@ -1080,8 +1085,8 @@ index 0000000..2a552bb '/test/pull-request/1/assign', follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '

    Title: PR from the feature branch

    ', output.data) self.assertNotIn( @@ -1103,8 +1108,8 @@ index 0000000..2a552bb follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '

    Title: PR from the feature branch

    ', output.data) self.assertNotIn( @@ -1121,8 +1126,8 @@ index 0000000..2a552bb follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '

    Title: PR from the feature branch

    ', output.data) self.assertIn( @@ -1140,8 +1145,8 @@ index 0000000..2a552bb follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '

    Title: PR from the feature branch

    ', output.data) self.assertIn( @@ -1258,7 +1263,7 @@ index 0000000..2a552bb output = self.app.get('/test/diff/feature..master') self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request # - test - Pagure', + 'Diff from master to feature - test - Pagure', output.data) self.assertIn( '

    No commits found

    ', output.data) @@ -1266,7 +1271,7 @@ index 0000000..2a552bb output = self.app.get('/test/diff/master..feature') self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request # - test - Pagure', + 'Diff from feature to master - test - Pagure', output.data) self.assertNotIn( 'Pull request # - test - Pagure', + 'Diff from feature to master - test - Pagure', output.data) self.assertIn( 'Pull request #2 - test - Pagure', + 'PR#2: foo bar PR - test - Pagure', output.data) self.assertIn( '
  • Request created
  • ', output.data) @@ -1423,8 +1428,8 @@ index 0000000..2a552bb follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • Comment added
  • ', output.data) @@ -1468,8 +1473,8 @@ index 0000000..2a552bb '/test/pull-request/1/comment/drop', follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn('href="#comment-1">ΒΆ', output.data) self.assertIn( '

    This look alright but we can do better

    ', @@ -1502,8 +1507,8 @@ index 0000000..2a552bb follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertIn( - 'Pull request #1 - test - Pagure', - output.data) + 'PR#1: PR from the feature branch - test - ' + 'Pagure', output.data) self.assertIn( '
  • Comment removed
  • ', output.data)