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
28142d51
Commit
28142d51
authored
Jul 01, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comment about how the resetting of the database works
parent
b0d70008
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
common/djangoapps/terrain/browser.py
+5
-0
No files found.
common/djangoapps/terrain/browser.py
View file @
28142d51
...
@@ -93,6 +93,11 @@ def reset_data(scenario):
...
@@ -93,6 +93,11 @@ def reset_data(scenario):
@after.each_scenario
@after.each_scenario
def
reset_databases
(
scenario
):
def
reset_databases
(
scenario
):
'''
After each scenario, all databases are cleared/dropped. Contentstore data are stored in unique databases
whereas modulestore data is in unique collection names. This data is created implicitly during the scenarios.
If no data is created during the test, these lines equivilently do nothing.
'''
mongo
=
MongoClient
()
mongo
=
MongoClient
()
mongo
.
drop_database
(
settings
.
CONTENTSTORE
[
'OPTIONS'
][
'db'
])
mongo
.
drop_database
(
settings
.
CONTENTSTORE
[
'OPTIONS'
][
'db'
])
_CONTENTSTORE
.
clear
()
_CONTENTSTORE
.
clear
()
...
...
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