aboutsummaryrefslogtreecommitdiffstats
path: root/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:27:21 +0000
commit81ee203fd55d45b199d7c3af681855d254e0d876 (patch)
tree5960635ea9498bb975f5b12c627466a0f0066fcf /lib/toaster
parentdd990ea6843685927954101feb729f3faa3a16d9 (diff)
downloadbitbake-81ee203fd55d45b199d7c3af681855d254e0d876.tar.gz
toaster: Fix assertRegexpMatches deprecation warnings
Fix: DeprecationWarning: Please use assertRegex instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r--lib/toaster/tests/browser/test_most_recent_builds_states.py8
-rw-r--r--lib/toaster/tests/browser/test_new_custom_image_page.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/toaster/tests/browser/test_most_recent_builds_states.py b/lib/toaster/tests/browser/test_most_recent_builds_states.py
index 949a94768..c13d328e4 100644
--- a/lib/toaster/tests/browser/test_most_recent_builds_states.py
+++ b/lib/toaster/tests/browser/test_most_recent_builds_states.py
@@ -47,7 +47,7 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
# build queued; check shown as queued
selector = base_selector + '[data-build-state="Queued"]'
element = self.wait_until_visible(selector)
- self.assertRegexpMatches(element.get_attribute('innerHTML'),
+ self.assertRegex(element.get_attribute('innerHTML'),
'Build queued', 'build should show queued status')
# waiting for recipes to be parsed
@@ -97,7 +97,7 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
selector = base_selector + '[data-build-state="Starting"]'
element = self.wait_until_visible(selector)
- self.assertRegexpMatches(element.get_attribute('innerHTML'),
+ self.assertRegex(element.get_attribute('innerHTML'),
'Tasks starting', 'build should show "tasks starting" status')
# first task finished; check tasks progress bar
@@ -186,7 +186,7 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
selector = '[data-latest-build-result="%s"] ' \
'[data-build-state="Cancelling"]' % build.id
element = self.wait_until_visible(selector)
- self.assertRegexpMatches(element.get_attribute('innerHTML'),
+ self.assertRegex(element.get_attribute('innerHTML'),
'Cancelling the build', 'build should show "cancelling" status')
# check cancelled state
@@ -198,5 +198,5 @@ class TestMostRecentBuildsStates(SeleniumTestCase):
selector = '[data-latest-build-result="%s"] ' \
'[data-build-state="Cancelled"]' % build.id
element = self.wait_until_visible(selector)
- self.assertRegexpMatches(element.get_attribute('innerHTML'),
+ self.assertRegex(element.get_attribute('innerHTML'),
'Build cancelled', 'build should show "cancelled" status')
diff --git a/lib/toaster/tests/browser/test_new_custom_image_page.py b/lib/toaster/tests/browser/test_new_custom_image_page.py
index 34d1bd45c..f4d95b1ac 100644
--- a/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -136,7 +136,7 @@ class TestNewCustomImagePage(SeleniumTestCase):
"""
self._create_custom_image(self.recipe.name)
element = self.wait_until_visible('#invalid-name-help')
- self.assertRegexpMatches(element.text.strip(),
+ self.assertRegex(element.text.strip(),
'image with this name already exists')
def test_new_duplicates_project_image(self):
@@ -154,4 +154,4 @@ class TestNewCustomImagePage(SeleniumTestCase):
self._create_custom_image(custom_image_name)
element = self.wait_until_visible('#invalid-name-help')
expected = 'An image with this name already exists in this project'
- self.assertRegexpMatches(element.text.strip(), expected)
+ self.assertRegex(element.text.strip(), expected)