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
985c6f64
Commit
985c6f64
authored
Sep 12, 2015
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the inheritance of tests into tests for the recommender tests
parent
4234ff59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
openedx/tests/xblock_integration/test_recommender.py
+11
-17
No files found.
openedx/tests/xblock_integration/test_recommender.py
View file @
985c6f64
...
...
@@ -224,13 +224,10 @@ class TestRecommenderCreateFromEmpty(TestRecommender):
@attr
(
'shard_1'
)
class
TestRecommenderWithResources
(
TestRecommender
):
"""
Check whether we can add/edit/flag/export resources correctly
"""
class
TestRecommenderResourceBase
(
TestRecommender
):
"""Base helper class for tests with resources."""
def
setUp
(
self
):
# call the setUp function from the superclass
super
(
TestRecommenderWithResources
,
self
)
.
setUp
()
super
(
TestRecommenderResourceBase
,
self
)
.
setUp
()
self
.
resource_id
=
self
.
resource_urls
[
0
]
self
.
resource_id_second
=
self
.
resource_urls
[
1
]
self
.
non_existing_resource_id
=
'An non-existing id'
...
...
@@ -258,6 +255,12 @@ class TestRecommenderWithResources(TestRecommender):
resource
.
update
(
edited_recommendations
)
return
resource
@attr
(
'shard_1'
)
class
TestRecommenderWithResources
(
TestRecommenderResourceBase
):
"""
Check whether we can add/edit/flag/export resources correctly
"""
def
test_add_redundant_resource
(
self
):
"""
Verify the addition of a redundant resource (url) is rejected
...
...
@@ -420,14 +423,10 @@ class TestRecommenderWithResources(TestRecommender):
@attr
(
'shard_1'
)
@ddt
class
TestRecommenderVoteWithResources
(
TestRecommender
WithResources
):
class
TestRecommenderVoteWithResources
(
TestRecommender
ResourceBase
):
"""
Check whether we can vote resources correctly
"""
def
setUp
(
self
):
# call the setUp function from the superclass
super
(
TestRecommenderVoteWithResources
,
self
)
.
setUp
()
@data
(
{
'event'
:
'recommender_upvote'
},
{
'event'
:
'recommender_downvote'
}
...
...
@@ -538,14 +537,10 @@ class TestRecommenderVoteWithResources(TestRecommenderWithResources):
@attr
(
'shard_1'
)
@ddt
class
TestRecommenderStaffFeedbackWithResources
(
TestRecommender
WithResources
):
class
TestRecommenderStaffFeedbackWithResources
(
TestRecommender
ResourceBase
):
"""
Check whether we can remove/endorse resources correctly
"""
def
setUp
(
self
):
# call the setUp function from the superclass
super
(
TestRecommenderStaffFeedbackWithResources
,
self
)
.
setUp
()
@data
(
'remove_resource'
,
'endorse_resource'
)
def
test_remove_or_endorse_resource_non_existing
(
self
,
test_case
):
"""
...
...
@@ -642,7 +637,6 @@ class TestRecommenderFileUploading(TestRecommender):
Check whether we can handle file uploading correctly
"""
def
setUp
(
self
):
# call the setUp function from the superclass
super
(
TestRecommenderFileUploading
,
self
)
.
setUp
()
self
.
initial_configuration
=
{
'flagged_accum_resources'
:
{},
...
...
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