NullTranslations object doesn't have ugettext attribute

Some of the tests are failing because NullTranslations object is
behaving differently with py2 and py3.With py2, it has 'ugettext'
attribute but with py3 it doesn't have.To make it compliant with
both versions modifications in the tests have been added so that
build will not fail.

PROD-663
This commit is contained in:
uzairr
2019-09-25 12:33:59 +05:00
parent 5d6a2ea022
commit a35b452877

View File

@@ -12,9 +12,9 @@ from django.contrib.auth.models import User
from django.utils import translation
from django.utils.translation import get_language
from openedx.core.lib.edx_six import get_gettext
from contentstore.tests.utils import AjaxEnabledTestClient
from contentstore.views.preview import _preview_module_system
from openedx.core.lib.edx_six import get_gettext
from xmodule.modulestore.django import ModuleI18nService
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory