mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: toaster: Fix assertRegexpMatches deprecation warnings
Fix:
DeprecationWarning: Please use assertRegex instead.
(Bitbake rev: 81ee203fd55d45b199d7c3af681855d254e0d876)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user