summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-06 14:43:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-06 22:28:03 +0000
commitc2484f3dec966b8698d921221185f35771ab58ef (patch)
tree705ca2ccb5ce46735838033aacfffa1cb6b10490 /bitbake/lib/toaster
parent029e82d418377468dfa167397a9e7271414ab506 (diff)
downloadpoky-c2484f3dec966b8698d921221185f35771ab58ef.tar.gz
bitbake: toaster: Fix assertRegexpMatches deprecation warnings
Fix: DeprecationWarning: Please use assertRegex instead. (Bitbake rev: 81ee203fd55d45b199d7c3af681855d254e0d876) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py8
-rw-r--r--bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py b/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
index 949a94768a..c13d328e47 100644
--- a/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
+++ b/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
@@ -47,7 +47,7 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
47 # build queued; check shown as queued 47 # build queued; check shown as queued
48 selector = base_selector + '[data-build-state="Queued"]' 48 selector = base_selector + '[data-build-state="Queued"]'
49 element = self.wait_until_visible(selector) 49 element = self.wait_until_visible(selector)
50 self.assertRegexpMatches(element.get_attribute('innerHTML'), 50 self.assertRegex(element.get_attribute('innerHTML'),
51 'Build queued', 'build should show queued status') 51 'Build queued', 'build should show queued status')
52 52
53 # waiting for recipes to be parsed 53 # waiting for recipes to be parsed
@@ -97,7 +97,7 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
97 97
98 selector = base_selector + '[data-build-state="Starting"]' 98 selector = base_selector + '[data-build-state="Starting"]'
99 element = self.wait_until_visible(selector) 99 element = self.wait_until_visible(selector)
100 self.assertRegexpMatches(element.get_attribute('innerHTML'), 100 self.assertRegex(element.get_attribute('innerHTML'),
101 'Tasks starting', 'build should show "tasks starting" status') 101 'Tasks starting', 'build should show "tasks starting" status')
102 102
103 # first task finished; check tasks progress bar 103 # first task finished; check tasks progress bar
@@ -186,7 +186,7 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
186 selector = '[data-latest-build-result="%s"] ' \ 186 selector = '[data-latest-build-result="%s"] ' \
187 '[data-build-state="Cancelling"]' % build.id 187 '[data-build-state="Cancelling"]' % build.id
188 element = self.wait_until_visible(selector) 188 element = self.wait_until_visible(selector)
189 self.assertRegexpMatches(element.get_attribute('innerHTML'), 189 self.assertRegex(element.get_attribute('innerHTML'),
190 'Cancelling the build', 'build should show "cancelling" status') 190 'Cancelling the build', 'build should show "cancelling" status')
191 191
192 # check cancelled state 192 # check cancelled state
@@ -198,5 +198,5 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
198 selector = '[data-latest-build-result="%s"] ' \ 198 selector = '[data-latest-build-result="%s"] ' \
199 '[data-build-state="Cancelled"]' % build.id 199 '[data-build-state="Cancelled"]' % build.id
200 element = self.wait_until_visible(selector) 200 element = self.wait_until_visible(selector)
201 self.assertRegexpMatches(element.get_attribute('innerHTML'), 201 self.assertRegex(element.get_attribute('innerHTML'),
202 'Build cancelled', 'build should show "cancelled" status') 202 'Build cancelled', 'build should show "cancelled" status')
diff --git a/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py b/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
index 34d1bd45c7..f4d95b1acd 100644
--- a/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -136,7 +136,7 @@ class TestNewCustomImagePage(SeleniumTestCase):
136 """ 136 """
137 self._create_custom_image(self.recipe.name) 137 self._create_custom_image(self.recipe.name)
138 element = self.wait_until_visible('#invalid-name-help') 138 element = self.wait_until_visible('#invalid-name-help')
139 self.assertRegexpMatches(element.text.strip(), 139 self.assertRegex(element.text.strip(),
140 'image with this name already exists') 140 'image with this name already exists')
141 141
142 def test_new_duplicates_project_image(self): 142 def test_new_duplicates_project_image(self):
@@ -154,4 +154,4 @@ class TestNewCustomImagePage(SeleniumTestCase):
154 self._create_custom_image(custom_image_name) 154 self._create_custom_image(custom_image_name)
155 element = self.wait_until_visible('#invalid-name-help') 155 element = self.wait_until_visible('#invalid-name-help')
156 expected = 'An image with this name already exists in this project' 156 expected = 'An image with this name already exists in this project'
157 self.assertRegexpMatches(element.text.strip(), expected) 157 self.assertRegex(element.text.strip(), expected)