diff --git a/tests/test_progit_flask_ui_issues.py b/tests/test_progit_flask_ui_issues.py index ec0d5fe..743998f 100644 --- a/tests/test_progit_flask_ui_issues.py +++ b/tests/test_progit_flask_ui_issues.py @@ -105,7 +105,8 @@ class PagureFlaskIssuestests(tests.Modeltests): '
test project #1
' in output.data) @@ -185,8 +186,8 @@ class PagureFlaskIssuestests(tests.Modeltests): stream.close() self.assertEqual(output.status_code, 200) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Issue created', output.data) self.assertTrue( 'test project #1
' in output.data) @@ -465,9 +466,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' - in output.data) + self.assertIn( + '\n Successfully edited issue #1', + output.data) self.assertTrue( '' in output.data) @@ -484,10 +485,12 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) - self.assertFalse( - 'li class="message">No changes to edit' in output.data) + self.assertIn( + '\n Comment added', + output.data) + self.assertNotIn( + '\n No changes to edit', + output.data) self.assertTrue( 'Woohoo a second comment !
' in output.data) self.assertEqual( @@ -508,10 +511,12 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) - self.assertFalse( - 'li class="message">No changes to edit' in output.data) + self.assertIn( + '\n Tag added: tag2', + output.data) + self.assertNotIn( + '\n No changes to edit', + output.data) self.assertTrue( 'Woohoo a second comment !
' in output.data) self.assertEqual( @@ -532,9 +537,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - 'Woohoo a second comment !
' in output.data) self.assertEqual( @@ -555,8 +560,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Issue assigned', + output.data) self.assertTrue( '' in output.data) self.assertTrue( @@ -600,9 +606,10 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Comment added', + output.data) self.assertTrue( 'Woohoo a second comment !
' in output.data) self.assertEqual( @@ -725,8 +733,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Comment removed', + output.data) # Drop non-existant comment output = self.app.post( @@ -794,8 +803,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Dependency added', + output.data) # Add an invalid dependent ticket data = { @@ -808,8 +818,8 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertFalse( - ' ' in output.data) + self.assertNotIn( + '\n Dependency added', output.data) repo = pagure.lib.get_project(self.session, 'test') issue = pagure.lib.search_issues(self.session, repo, issueid=1) @@ -873,8 +883,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Dependency added', + output.data) # Add an invalid dependent ticket data = { @@ -887,8 +898,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertFalse( - ' ' in output.data) + self.assertNotIn( + '\n Dependency added', + output.data) repo = pagure.lib.get_project(self.session, 'test') issue = pagure.lib.search_issues(self.session, repo, issueid=1) @@ -1145,9 +1157,9 @@ class PagureFlaskIssuestests(tests.Modeltests): output = self.app.post( '/test/issue/1/edit', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) - self.assertTrue( - ' ' - in output.data) + self.assertIn( + '\n Successfully edited issue #1', + output.data) self.assertTrue( '#1 ' 'Test issue #1' in output.data) @@ -1246,9 +1258,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' - in output.data) + self.assertIn( + '\n Edited tag: tag1 to tag2', + output.data) # After edit, list tags tags = pagure.lib.get_tags_of_project(self.session, repo) @@ -1328,8 +1340,9 @@ class PagureFlaskIssuestests(tests.Modeltests): '/test/droptag/', data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) self.assertTrue("test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Comment added', + output.data) self.assertTrue( 'Woohoo a second comment !
' in output.data) self.assertEqual( @@ -1495,8 +1509,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Comment updated', + output.data) repo = pagure.lib.get_project(self.session, 'test') issue = pagure.lib.search_issues(self.session, repo, issueid=1) @@ -1529,8 +1544,9 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertTrue( 'test project #1
' in output.data) - self.assertTrue( - ' ' in output.data) + self.assertIn( + '\n Comment updated', + output.data) repo = pagure.lib.get_project(self.session, 'test') issue = pagure.lib.search_issues(self.session, repo, issueid=1)