You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/09/02 14:51:55 UTC

[allura] branch master updated: test fixes

This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new f8409f113 test fixes
f8409f113 is described below

commit f8409f113b39ae893e0a228187a880ced278c234
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Fri Sep 2 08:51:40 2022 -0600

    test fixes
---
 Allura/allura/tests/functional/test_root.py             | 2 +-
 Allura/allura/tests/functional/test_site_admin.py       | 2 +-
 ForgeGit/forgegit/tests/functional/test_controllers.py  | 6 +++---
 ForgeTracker/forgetracker/tests/functional/test_root.py | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Allura/allura/tests/functional/test_root.py b/Allura/allura/tests/functional/test_root.py
index 5e6db0ef2..83eadf9c5 100644
--- a/Allura/allura/tests/functional/test_root.py
+++ b/Allura/allura/tests/functional/test_root.py
@@ -62,7 +62,7 @@ class TestRootController(TestController):
 
     def test_neighborhood(self):
         response = self.app.get('/neighborhood')
-        assert_equal(response.html.find('h2', {'class': 'dark title'}).contents[
+        assert_equal(response.html.find('h2', {'class': 'dark title'}).find('span').contents[
                      0].strip(), 'All Neighborhoods')
         nbhds = response.html.findAll('div', {'class': 'nbhd_name'})
         assert nbhds[0].find('a').get('href') == '/adobe/'
diff --git a/Allura/allura/tests/functional/test_site_admin.py b/Allura/allura/tests/functional/test_site_admin.py
index bcf3a5d12..819353de0 100644
--- a/Allura/allura/tests/functional/test_site_admin.py
+++ b/Allura/allura/tests/functional/test_site_admin.py
@@ -55,7 +55,7 @@ class TestSiteAdmin(TestController):
         r = self.app.get('/nf/admin/stats/', extra_environ=dict(
             username='root'))
         assert 'Forge Site Admin' in r.html.find(
-            'h2', {'class': 'dark title'}).contents[0]
+            'h2', {'class': 'dark title'}).find('span').contents[0]
         stats_table = r.html.find('table')
         cells = stats_table.findAll('td')
         assert cells[0].contents[0] == 'Adobe', cells[0].contents[0]
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 2bc49ed68..0a966d04e 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -277,7 +277,7 @@ class TestRootController(_TestCase):
     def test_file(self):
         ci = self._get_ci()
         resp = self.app.get(ci + 'tree/README')
-        assert 'README' in resp.html.find('h2', {'class': 'dark title'}).contents[4]
+        assert 'README' in resp.html.find('h2', {'class': 'dark title'}).find('span').contents[4]
         content = str(resp.html.find('div', {'class': 'clip grid-19 codebrowser'}))
         assert 'This is readme' in content, content
         assert '<span id="l1" class="code_block">' in resp
@@ -404,7 +404,7 @@ class TestRootController(_TestCase):
 
         # `index.html` in repo root
         r = self.app.get(ci + 'tree/index.html')
-        header_bit = r.html.find('h2', {'class': 'dark title'}).contents[4]
+        header_bit = r.html.find('h2', {'class': 'dark title'}).find('span').contents[4]
         assert 'index.html' in header_bit, header_bit
         content = str(r.html.find('div', {'class': 'clip grid-19 codebrowser'}))
         assert ('<span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>'
@@ -417,7 +417,7 @@ class TestRootController(_TestCase):
 
         # `index.htm` in `index` dir
         r = self.app.get(ci + 'tree/index/index.htm')
-        header = r.html.find('h2', {'class': 'dark title'})
+        header = r.html.find('h2', {'class': 'dark title'}).find('span')
         assert 'index' in header.contents[5], header.contents[5]
         assert 'index.htm' in header.contents[6], header.contents[6]
         content = str(r.html.find('div', {'class': 'clip grid-19 codebrowser'}))
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 0d98c0a9b..8faf398de 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2185,7 +2185,7 @@ class TestFunctionalController(TrackerTestController):
         r = self.app.post('/p/test/bugs/1/move/',
                           params={'tracker': str(tracker.config._id)}).follow()
         assert_equal(r.request.path, '/p/test2/bugs2/1/')
-        summary = r.html.findAll('h2', {'class': 'dark title'})[0].contents[0].strip()
+        summary = r.html.findAll('h2', {'class': 'dark title'})[0].find('span').contents[0].strip()
         assert_equal(summary, '#1 test')
         ac_id = tracker.config._id
         ticket = tm.Ticket.query.find({