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
7c5879a1
Commit
7c5879a1
authored
Aug 27, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use os.path.join
parent
093f0806
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
common/lib/xmodule/xmodule/tests/__init__.py
+5
-4
No files found.
common/lib/xmodule/xmodule/tests/__init__.py
View file @
7c5879a1
...
...
@@ -19,6 +19,7 @@ import capa.calc as calc
import
capa.capa_problem
as
lcp
from
capa.correctmap
import
CorrectMap
from
capa.util
import
convert_files_to_filenames
from
capa.xqueue_interface
import
dateformat
from
datetime
import
datetime
from
xmodule
import
graders
,
x_module
from
xmodule.x_module
import
ModuleSystem
...
...
@@ -36,7 +37,7 @@ i4xs = ModuleSystem(
user
=
Mock
(),
filestore
=
fs
.
osfs
.
OSFS
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
+
"/test_files"
),
debug
=
True
,
xqueue
=
{
'interface'
:
None
,
'callback_url'
:
'/'
,
'default_queuename'
:
'testqueue'
},
xqueue
=
{
'interface'
:
None
,
'callback_url'
:
'/'
,
'default_queuename'
:
'testqueue'
,
'waittime'
:
10
},
node_path
=
os
.
environ
.
get
(
"NODE_PATH"
,
"/usr/local/lib/node_modules"
)
)
...
...
@@ -286,14 +287,14 @@ class CodeResponseTest(unittest.TestCase):
'''
@staticmethod
def
make_queuestate
(
key
,
time
):
timestr
=
datetime
.
strftime
(
time
,
'
%
Y
%
m
%
d
%
H
%
M
%
S'
)
return
(
key
,
timestr
)
timestr
=
datetime
.
strftime
(
time
,
dateformat
)
return
{
'key'
:
key
,
'time'
:
timestr
}
def
test_is_queued
(
self
):
'''
Simple test of whether LoncapaProblem knows when it's been queued
'''
problem_file
=
os
.
path
.
dirname
(
__file__
)
+
"/test_files/coderesponse.xml"
problem_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_files/coderesponse.xml"
)
test_lcp
=
lcp
.
LoncapaProblem
(
open
(
problem_file
)
.
read
(),
'1'
,
system
=
i4xs
)
answer_ids
=
sorted
(
test_lcp
.
get_question_answers
()
.
keys
())
...
...
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