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
9eb27669
Commit
9eb27669
authored
Feb 21, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change test modulestore naming differentiation scheme to uuid
parent
49cab68a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
cms/djangoapps/contentstore/tests/utils.py
+4
-5
No files found.
cms/djangoapps/contentstore/tests/utils.py
View file @
9eb27669
import
json
import
copy
from
time
import
time
from
uuid
import
uuid4
from
django.test
import
TestCase
from
django.conf
import
settings
...
...
@@ -20,13 +20,12 @@ class ModuleStoreTestCase(TestCase):
def
_pre_setup
(
self
):
super
(
ModuleStoreTestCase
,
self
)
.
_pre_setup
()
# Use
the current seconds since epoch
to differentiate
# Use
a uuid
to differentiate
# the mongo collections on jenkins.
sec_since_epoch
=
'
%
s'
%
int
(
time
()
*
100
)
self
.
orig_MODULESTORE
=
copy
.
deepcopy
(
settings
.
MODULESTORE
)
self
.
test_MODULESTORE
=
self
.
orig_MODULESTORE
self
.
test_MODULESTORE
[
'default'
][
'OPTIONS'
][
'collection'
]
=
'modulestore_
%
s'
%
sec_since_epoch
self
.
test_MODULESTORE
[
'direct'
][
'OPTIONS'
][
'collection'
]
=
'modulestore_
%
s'
%
sec_since_epoch
self
.
test_MODULESTORE
[
'default'
][
'OPTIONS'
][
'collection'
]
=
'modulestore_
%
s'
%
uuid4
()
.
hex
self
.
test_MODULESTORE
[
'direct'
][
'OPTIONS'
][
'collection'
]
=
'modulestore_
%
s'
%
uuid4
()
.
hex
settings
.
MODULESTORE
=
self
.
test_MODULESTORE
# Flush and initialize the module store
...
...
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