Account settings page should load and create student user profile

ECOM-4776
This commit is contained in:
Ahsan Ulhaq
2017-03-30 16:57:56 +05:00
parent be5c4fad8b
commit 04ca94eaef
8 changed files with 156 additions and 30 deletions

View File

@@ -15,6 +15,7 @@ from nose.plugins.attrib import attr
from openedx.core.djangoapps.dark_lang.models import DarkLangConfig
from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY
from openedx.core.djangoapps.user_api.preferences.api import set_user_preference
from student.models import UserProfile
from student.tests.factories import UserFactory
@@ -118,6 +119,7 @@ class I18nRegressionTests(BaseI18nTestCase):
def test_unreleased_lang_resolution(self):
# Regression test; LOC-85
UserProfile.objects.create(user=self.user)
self.release_languages('fa')
self.user_login()
@@ -134,6 +136,7 @@ class I18nRegressionTests(BaseI18nTestCase):
self.assert_tag_has_attr(response.content, "html", "lang", "fa-ir")
def test_preview_lang(self):
UserProfile.objects.create(user=self.user)
self.user_login()
# Regression test; LOC-87
@@ -169,6 +172,7 @@ class I18nLangPrefTests(BaseI18nTestCase):
"""
def setUp(self):
super(I18nLangPrefTests, self).setUp()
UserProfile.objects.create(user=self.user)
self.user_login()
def test_lang_preference(self):