Replaced ugettext and ugettext_lazy with gettext and gettext_lazy
ugettext and ugettext_lazy were deprecated in Django 3 and will be removed in Django 4.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.test import tag
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext
|
||||
from django.utils.translation import gettext
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
@@ -105,7 +105,7 @@ class TestCase(ScreenshotTestCase):
|
||||
|
||||
# Click on 'set password' -> save set password page
|
||||
user_menu = c.find_element(By.CSS_SELECTOR, '#login-widget ul')
|
||||
link = user_menu.find_element(By.PARTIAL_LINK_TEXT, ugettext('Passwort ändern'))
|
||||
link = user_menu.find_element(By.PARTIAL_LINK_TEXT, gettext('Passwort ändern'))
|
||||
link.click()
|
||||
password_field = self.wait_on_presence(c, (By.ID, 'id_new_password'))
|
||||
self.save_screenshot('empty_set_password_form', sequence=sequence_name)
|
||||
@@ -189,7 +189,7 @@ class TestCase(ScreenshotTestCase):
|
||||
dropdown_button = self.wait_on_presence(c, (By.ID, 'user_dropdown_button'))
|
||||
dropdown_button.click()
|
||||
user_menu = c.find_element(By.CSS_SELECTOR, '#login-widget ul')
|
||||
link = user_menu.find_element(By.PARTIAL_LINK_TEXT, ugettext('Logout'))
|
||||
link = user_menu.find_element(By.PARTIAL_LINK_TEXT, gettext('Logout'))
|
||||
link.click()
|
||||
self.wait_until_stale(c, user_menu)
|
||||
self.save_screenshot('logout_succeed', sequence=sequence_name)
|
||||
@@ -200,7 +200,7 @@ class TestCase(ScreenshotTestCase):
|
||||
self.wait_on_presence(c, (By.ID, 'id_username'))
|
||||
|
||||
# Locate password recreate link, click it -> save password recreate form
|
||||
link = c.find_element(By.PARTIAL_LINK_TEXT, ugettext('Passwort vergessen'))
|
||||
link = c.find_element(By.PARTIAL_LINK_TEXT, gettext('Passwort vergessen'))
|
||||
link.click()
|
||||
username_field = self.wait_on_presence(c, (By.ID, 'id_username'))
|
||||
self.save_screenshot('empty_recreate_password_form', sequence=sequence_name)
|
||||
@@ -212,7 +212,7 @@ class TestCase(ScreenshotTestCase):
|
||||
self.save_screenshot('recreate_password_invalid_user', sequence=sequence_name)
|
||||
|
||||
# Locate password recreate link, click it
|
||||
link = c.find_element(By.PARTIAL_LINK_TEXT, ugettext('Passwort vergessen'))
|
||||
link = c.find_element(By.PARTIAL_LINK_TEXT, gettext('Passwort vergessen'))
|
||||
link.click()
|
||||
username_field = self.wait_on_presence(c, (By.ID, 'id_username'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user