You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/04/16 19:05:11 UTC

[14/17] allura git commit: [#6017] ticket:756 Test attachments changelog better

[#6017] ticket:756 Test attachments changelog better


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/ad7c5f9c
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ad7c5f9c
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ad7c5f9c

Branch: refs/heads/hs/7852
Commit: ad7c5f9cc4ea231dc896a7fbb14be6956125cd4a
Parents: b5a084f
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Apr 16 15:10:13 2015 +0000
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Thu Apr 16 15:10:13 2015 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/tests/functional/test_root.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/ad7c5f9c/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 666fbc1..21a3564 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -790,6 +790,10 @@ class TestFunctionalController(TrackerTestController):
         }, upload_files=[upload]).follow()
         assert_true(file_name in ticket_editor)
         assert '<span>py</span>' not in ticket_editor
+        ticket_page = self.app.get('/bugs/1/')
+        diff = ticket_page.html.findAll('div', attrs={'class': 'codehilite'})
+        added = diff[-1].findAll('span', attrs={'class': 'gi'})[-1]
+        assert_in('+test_root.py', added.getText())
 
     def test_delete_attachment(self):
         file_name = 'test_root.py'
@@ -806,8 +810,11 @@ class TestFunctionalController(TrackerTestController):
         self.app.post(str(file_link['href']), {
             'delete': 'True'
         })
-        deleted_form = self.app.get('/bugs/1/')
-        assert file_link not in deleted_form
+        ticket_page = self.app.get('/bugs/1/')
+        assert file_link not in ticket_page
+        diff = ticket_page.html.findAll('div', attrs={'class': 'codehilite'})
+        removed = diff[-1].findAll('span', attrs={'class': 'gd'})[-1]
+        assert_in('-test_root.py', removed.getText())
 
     def test_delete_attachment_from_comments(self):
         ticket_view = self.new_ticket(summary='test ticket').follow()