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
03256937
Commit
03256937
authored
Jul 28, 2016
by
Sanford Student
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing failing tests on master from enabling milestones_app feature flag
parent
e861b609
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
10 deletions
+24
-10
lms/djangoapps/courseware/features/common.py
+8
-1
lms/djangoapps/courseware/tests/test_masquerade.py
+2
-1
lms/djangoapps/courseware/tests/test_module_render.py
+1
-1
lms/djangoapps/courseware/tests/test_navigation.py
+2
-1
lms/djangoapps/courseware/tests/test_split_module.py
+2
-1
lms/djangoapps/courseware/tests/test_views.py
+5
-5
openedx/tests/xblock_integration/test_done.py
+4
-0
No files found.
lms/djangoapps/courseware/features/common.py
View file @
03256937
...
@@ -5,10 +5,11 @@ from __future__ import absolute_import
...
@@ -5,10 +5,11 @@ from __future__ import absolute_import
import
time
import
time
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
,
before
from
lettuce.django
import
django_url
from
lettuce.django
import
django_url
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
milestones.models
import
MilestoneRelationshipType
from
student.models
import
CourseEnrollment
from
student.models
import
CourseEnrollment
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.course_module
import
CourseDescriptor
from
xmodule.course_module
import
CourseDescriptor
...
@@ -18,6 +19,12 @@ from logging import getLogger
...
@@ -18,6 +19,12 @@ from logging import getLogger
logger
=
getLogger
(
__name__
)
logger
=
getLogger
(
__name__
)
@before.each_scenario
# pylint: disable=no-member
def
setup_milestones_app
(
scenario
):
# pylint: disable=unused-argument
MilestoneRelationshipType
.
objects
.
get_or_create
(
name
=
'requires'
)
MilestoneRelationshipType
.
objects
.
get_or_create
(
name
=
'fulfills'
)
@step
(
'I (.*) capturing of screenshots before and after each step$'
)
@step
(
'I (.*) capturing of screenshots before and after each step$'
)
def
configure_screenshots_for_all_steps
(
_step
,
action
):
def
configure_screenshots_for_all_steps
(
_step
,
action
):
"""
"""
...
...
lms/djangoapps/courseware/tests/test_masquerade.py
View file @
03256937
...
@@ -22,6 +22,7 @@ from courseware.masquerade import (
...
@@ -22,6 +22,7 @@ from courseware.masquerade import (
from
courseware.tests.factories
import
StaffFactory
from
courseware.tests.factories
import
StaffFactory
from
courseware.tests.helpers
import
LoginEnrollmentTestCase
,
get_request_for_user
from
courseware.tests.helpers
import
LoginEnrollmentTestCase
,
get_request_for_user
from
courseware.tests.test_submitting_problems
import
ProblemSubmissionTestMixin
from
courseware.tests.test_submitting_problems
import
ProblemSubmissionTestMixin
from
milestones.tests.utils
import
MilestonesTestCaseMixin
from
student.tests.factories
import
UserFactory
from
student.tests.factories
import
UserFactory
from
xblock.runtime
import
DictKeyValueStore
from
xblock.runtime
import
DictKeyValueStore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
...
@@ -31,7 +32,7 @@ from xmodule.partitions.partitions import Group, UserPartition
...
@@ -31,7 +32,7 @@ from xmodule.partitions.partitions import Group, UserPartition
from
openedx.core.djangoapps.self_paced.models
import
SelfPacedConfiguration
from
openedx.core.djangoapps.self_paced.models
import
SelfPacedConfiguration
class
MasqueradeTestCase
(
SharedModuleStoreTestCase
,
LoginEnrollmentTestCase
):
class
MasqueradeTestCase
(
SharedModuleStoreTestCase
,
LoginEnrollmentTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Base class for masquerade tests that sets up a test course and enrolls a user in the course.
Base class for masquerade tests that sets up a test course and enrolls a user in the course.
"""
"""
...
...
lms/djangoapps/courseware/tests/test_module_render.py
View file @
03256937
...
@@ -407,7 +407,7 @@ class ModuleRenderTestCase(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
...
@@ -407,7 +407,7 @@ class ModuleRenderTestCase(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
TestHandleXBlockCallback
(
SharedModuleStoreTestCase
,
LoginEnrollmentTestCase
):
class
TestHandleXBlockCallback
(
SharedModuleStoreTestCase
,
LoginEnrollmentTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Test the handle_xblock_callback function
Test the handle_xblock_callback function
"""
"""
...
...
lms/djangoapps/courseware/tests/test_navigation.py
View file @
03256937
...
@@ -11,6 +11,7 @@ from django.test.utils import override_settings
...
@@ -11,6 +11,7 @@ from django.test.utils import override_settings
from
courseware.tests.helpers
import
LoginEnrollmentTestCase
from
courseware.tests.helpers
import
LoginEnrollmentTestCase
from
courseware.tests.factories
import
GlobalStaffFactory
from
courseware.tests.factories
import
GlobalStaffFactory
from
milestones.tests.utils
import
MilestonesTestCaseMixin
from
student.tests.factories
import
UserFactory
from
student.tests.factories
import
UserFactory
from
xmodule.modulestore.tests.django_utils
import
SharedModuleStoreTestCase
from
xmodule.modulestore.tests.django_utils
import
SharedModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
...
@@ -18,7 +19,7 @@ from xmodule.modulestore.django import modulestore
...
@@ -18,7 +19,7 @@ from xmodule.modulestore.django import modulestore
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
TestNavigation
(
SharedModuleStoreTestCase
,
LoginEnrollmentTestCase
):
class
TestNavigation
(
SharedModuleStoreTestCase
,
LoginEnrollmentTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Check that navigation state is saved properly.
Check that navigation state is saved properly.
"""
"""
...
...
lms/djangoapps/courseware/tests/test_split_module.py
View file @
03256937
...
@@ -7,6 +7,7 @@ from nose.plugins.attrib import attr
...
@@ -7,6 +7,7 @@ from nose.plugins.attrib import attr
from
courseware.module_render
import
get_module_for_descriptor
from
courseware.module_render
import
get_module_for_descriptor
from
courseware.model_data
import
FieldDataCache
from
courseware.model_data
import
FieldDataCache
from
milestones.tests.utils
import
MilestonesTestCaseMixin
from
student.tests.factories
import
UserFactory
,
CourseEnrollmentFactory
from
student.tests.factories
import
UserFactory
,
CourseEnrollmentFactory
from
xmodule.modulestore.tests.factories
import
ItemFactory
,
CourseFactory
from
xmodule.modulestore.tests.factories
import
ItemFactory
,
CourseFactory
from
xmodule.modulestore.tests.django_utils
import
SharedModuleStoreTestCase
from
xmodule.modulestore.tests.django_utils
import
SharedModuleStoreTestCase
...
@@ -15,7 +16,7 @@ from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactor
...
@@ -15,7 +16,7 @@ from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactor
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
SplitTestBase
(
SharedModuleStoreTestCase
):
class
SplitTestBase
(
SharedModuleStoreTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Sets up a basic course and user for split test testing.
Sets up a basic course and user for split test testing.
Also provides tests of rendered HTML for two user_tag conditions, 0 and 1.
Also provides tests of rendered HTML for two user_tag conditions, 0 and 1.
...
...
lms/djangoapps/courseware/tests/test_views.py
View file @
03256937
...
@@ -191,7 +191,7 @@ class TestJumpTo(ModuleStoreTestCase):
...
@@ -191,7 +191,7 @@ class TestJumpTo(ModuleStoreTestCase):
@attr
(
'shard_2'
)
@attr
(
'shard_2'
)
@ddt.ddt
@ddt.ddt
class
ViewsTestCase
(
ModuleStoreTestCase
):
class
ViewsTestCase
(
ModuleStoreTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Tests for views.py methods.
Tests for views.py methods.
"""
"""
...
@@ -939,7 +939,7 @@ class ViewsTestCase(ModuleStoreTestCase):
...
@@ -939,7 +939,7 @@ class ViewsTestCase(ModuleStoreTestCase):
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
# setting TIME_ZONE_DISPLAYED_FOR_DEADLINES explicitly
# setting TIME_ZONE_DISPLAYED_FOR_DEADLINES explicitly
@override_settings
(
TIME_ZONE_DISPLAYED_FOR_DEADLINES
=
"UTC"
)
@override_settings
(
TIME_ZONE_DISPLAYED_FOR_DEADLINES
=
"UTC"
)
class
BaseDueDateTests
(
ModuleStoreTestCase
):
class
BaseDueDateTests
(
ModuleStoreTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Base class that verifies that due dates are rendered correctly on a page
Base class that verifies that due dates are rendered correctly on a page
"""
"""
...
@@ -1816,7 +1816,7 @@ class ViewCheckerBlock(XBlock):
...
@@ -1816,7 +1816,7 @@ class ViewCheckerBlock(XBlock):
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
@ddt.ddt
@ddt.ddt
class
TestIndexView
(
ModuleStoreTestCase
):
class
TestIndexView
(
ModuleStoreTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Tests of the courseware.views.index view.
Tests of the courseware.views.index view.
"""
"""
...
@@ -1888,7 +1888,7 @@ class TestIndexView(ModuleStoreTestCase):
...
@@ -1888,7 +1888,7 @@ class TestIndexView(ModuleStoreTestCase):
@ddt.ddt
@ddt.ddt
class
TestInde
wViewWithVerticalPositions
(
ModuleStoreTestCase
):
class
TestInde
xViewWithVerticalPositions
(
ModuleStoreTestCase
,
MilestonesTestCaseMixin
):
"""
"""
Test the index view to handle vertical positions. Confirms that first position is loaded
Test the index view to handle vertical positions. Confirms that first position is loaded
if input position is non-positive or greater than number of positions available.
if input position is non-positive or greater than number of positions available.
...
@@ -1898,7 +1898,7 @@ class TestIndewViewWithVerticalPositions(ModuleStoreTestCase):
...
@@ -1898,7 +1898,7 @@ class TestIndewViewWithVerticalPositions(ModuleStoreTestCase):
"""
"""
Set up initial test data
Set up initial test data
"""
"""
super
(
TestInde
w
ViewWithVerticalPositions
,
self
)
.
setUp
()
super
(
TestInde
x
ViewWithVerticalPositions
,
self
)
.
setUp
()
self
.
user
=
UserFactory
()
self
.
user
=
UserFactory
()
...
...
openedx/tests/xblock_integration/test_done.py
View file @
03256937
...
@@ -4,10 +4,14 @@ Tests for the DoneXBlock.
...
@@ -4,10 +4,14 @@ Tests for the DoneXBlock.
This is nice as a simple example of the edX XBlock test framework.
This is nice as a simple example of the edX XBlock test framework.
'''
'''
from
mock
import
patch
from
openedx.tests.xblock_integration.xblock_testcase
import
XBlockTestCase
from
openedx.tests.xblock_integration.xblock_testcase
import
XBlockTestCase
# We set MILESTONES_APP to False to avoid XBlock access issues in this test,
# which is meant to exist independent of our particular LMS instance.
# pylint: disable=abstract-method
# pylint: disable=abstract-method
@patch.dict
(
'django.conf.settings.FEATURES'
,
{
'MILESTONES_APP'
:
False
})
class
TestDone
(
XBlockTestCase
):
class
TestDone
(
XBlockTestCase
):
"""
"""
Simple tests for the completion XBlock. We set up a page with two
Simple tests for the completion XBlock. We set up a page with two
...
...
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