Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
4d21fbe6
Commit
4d21fbe6
authored
Apr 12, 2017
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use UserFactory.create so that it creates a UserProfile for the user
parent
e733179d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
+1
-6
lms/djangoapps/courseware/tests/test_i18n.py
+1
-6
No files found.
lms/djangoapps/courseware/tests/test_i18n.py
View file @
4d21fbe6
...
...
@@ -15,7 +15,6 @@ 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
student.models
import
UserProfile
from
student.tests.factories
import
UserFactory
...
...
@@ -61,8 +60,7 @@ class BaseI18nTestCase(TestCase):
"""
# Create one user and save it to the database
email
=
'test@edx.org'
self
.
user
=
UserFactory
.
build
(
username
=
'test'
,
email
=
email
,
password
=
self
.
pwd
)
self
.
user
.
save
()
self
.
user
=
UserFactory
.
create
(
username
=
'test'
,
email
=
email
,
password
=
self
.
pwd
)
def
user_login
(
self
):
"""
...
...
@@ -119,7 +117,6 @@ 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
()
...
...
@@ -136,7 +133,6 @@ 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
...
...
@@ -172,7 +168,6 @@ class I18nLangPrefTests(BaseI18nTestCase):
"""
def
setUp
(
self
):
super
(
I18nLangPrefTests
,
self
)
.
setUp
()
UserProfile
.
objects
.
create
(
user
=
self
.
user
)
self
.
user_login
()
def
set_lang_preference
(
self
,
language
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment