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
cee24c5c
Commit
cee24c5c
authored
12 years ago
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import existing UserFactory
parent
2fd9ccec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
lms/djangoapps/courseware/tests/test_module_render.py
+2
-6
lms/djangoapps/courseware/tests/test_views.py
+2
-5
No files found.
lms/djangoapps/courseware/tests/test_module_render.py
View file @
cee24c5c
...
...
@@ -25,6 +25,8 @@ from xmodule.seq_module import SequenceModule
from
courseware.tests.tests
import
PageLoader
from
student.models
import
Registration
from
factories
import
UserFactory
class
Stub
:
def
__init__
(
self
):
pass
...
...
@@ -40,12 +42,6 @@ def xml_store_config(data_dir):
}
}
class
UserFactory
(
factory
.
Factory
):
first_name
=
'Test'
last_name
=
'Robot'
is_staff
=
True
is_active
=
True
TEST_DATA_DIR
=
settings
.
COMMON_TEST_DATA_ROOT
TEST_DATA_XML_MODULESTORE
=
xml_store_config
(
TEST_DATA_DIR
)
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/courseware/tests/test_views.py
View file @
cee24c5c
...
...
@@ -19,14 +19,11 @@ from xmodule.modulestore.exceptions import InvalidLocationError,\
import
courseware.views
as
views
from
xmodule.modulestore
import
Location
from
factories
import
UserFactory
class
Stub
():
pass
class
UserFactory
(
factory
.
Factory
):
first_name
=
'Test'
last_name
=
'Robot'
is_staff
=
True
is_active
=
True
# This part is required for modulestore() to work properly
def
xml_store_config
(
data_dir
):
...
...
This diff is collapsed.
Click to expand it.
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