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
ba59e3b8
Commit
ba59e3b8
authored
May 22, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Serial number commands deserialize course keys
parent
30184dbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lms/djangoapps/licenses/tests.py
+4
-4
No files found.
lms/djangoapps/licenses/tests.py
View file @
ba59e3b8
...
@@ -156,12 +156,12 @@ class CommandTest(ModuleStoreTestCase):
...
@@ -156,12 +156,12 @@ class CommandTest(ModuleStoreTestCase):
log
.
debug
(
'Adding one set of serials for {0}'
.
format
(
SOFTWARE_1
))
log
.
debug
(
'Adding one set of serials for {0}'
.
format
(
SOFTWARE_1
))
with
generate_serials_file
(
size
)
as
temp_file
:
with
generate_serials_file
(
size
)
as
temp_file
:
args
=
[
self
.
course_id
,
SOFTWARE_1
,
temp_file
.
name
]
args
=
[
self
.
course_id
.
to_deprecated_string
()
,
SOFTWARE_1
,
temp_file
.
name
]
call_command
(
'import_serial_numbers'
,
*
args
)
call_command
(
'import_serial_numbers'
,
*
args
)
log
.
debug
(
'Adding one set of serials for {0}'
.
format
(
SOFTWARE_2
))
log
.
debug
(
'Adding one set of serials for {0}'
.
format
(
SOFTWARE_2
))
with
generate_serials_file
(
size
)
as
temp_file
:
with
generate_serials_file
(
size
)
as
temp_file
:
args
=
[
self
.
course_id
,
SOFTWARE_2
,
temp_file
.
name
]
args
=
[
self
.
course_id
.
to_deprecated_string
()
,
SOFTWARE_2
,
temp_file
.
name
]
call_command
(
'import_serial_numbers'
,
*
args
)
call_command
(
'import_serial_numbers'
,
*
args
)
log
.
debug
(
'There should be only 2 course-software entries'
)
log
.
debug
(
'There should be only 2 course-software entries'
)
...
@@ -174,7 +174,7 @@ class CommandTest(ModuleStoreTestCase):
...
@@ -174,7 +174,7 @@ class CommandTest(ModuleStoreTestCase):
log
.
debug
(
'Adding more serial numbers to {0}'
.
format
(
SOFTWARE_1
))
log
.
debug
(
'Adding more serial numbers to {0}'
.
format
(
SOFTWARE_1
))
with
generate_serials_file
(
size
)
as
temp_file
:
with
generate_serials_file
(
size
)
as
temp_file
:
args
=
[
self
.
course_id
,
SOFTWARE_1
,
temp_file
.
name
]
args
=
[
self
.
course_id
.
to_deprecated_string
()
,
SOFTWARE_1
,
temp_file
.
name
]
call_command
(
'import_serial_numbers'
,
*
args
)
call_command
(
'import_serial_numbers'
,
*
args
)
log
.
debug
(
'There should be still only 2 course-software entries'
)
log
.
debug
(
'There should be still only 2 course-software entries'
)
...
@@ -197,7 +197,7 @@ class CommandTest(ModuleStoreTestCase):
...
@@ -197,7 +197,7 @@ class CommandTest(ModuleStoreTestCase):
with
NamedTemporaryFile
()
as
tmpfile
:
with
NamedTemporaryFile
()
as
tmpfile
:
tmpfile
.
write
(
'
\n
'
.
join
(
known_serials
))
tmpfile
.
write
(
'
\n
'
.
join
(
known_serials
))
tmpfile
.
flush
()
tmpfile
.
flush
()
args
=
[
self
.
course_id
,
SOFTWARE_1
,
tmpfile
.
name
]
args
=
[
self
.
course_id
.
to_deprecated_string
()
,
SOFTWARE_1
,
tmpfile
.
name
]
call_command
(
'import_serial_numbers'
,
*
args
)
call_command
(
'import_serial_numbers'
,
*
args
)
log
.
debug
(
'Check if we added only the new ones'
)
log
.
debug
(
'Check if we added only the new ones'
)
...
...
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