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
7bcfc44b
Commit
7bcfc44b
authored
Jan 17, 2013
by
Brian Wilson
Committed by
Ashley Penney
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add first test shell
parent
c5979f8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
common/djangoapps/student/management/commands/test/__init__.py
+0
-0
common/djangoapps/student/management/commands/test/test_pearson.py
+54
-0
No files found.
common/djangoapps/student/management/commands/test/__init__.py
0 → 100644
View file @
7bcfc44b
common/djangoapps/student/management/commands/test/test_pearson.py
0 → 100644
View file @
7bcfc44b
'''
Created on Jan 17, 2013
@author: brian
'''
import
logging
from
django.test
import
TestCase
from
student.models
import
User
,
TestCenterRegistration
,
TestCenterUser
,
unique_id_for_user
from
mock
import
Mock
from
datetime
import
datetime
from
django.core
import
management
COURSE_1
=
'edX/toy/2012_Fall'
COURSE_2
=
'edx/full/6.002_Spring_2012'
log
=
logging
.
getLogger
(
__name__
)
class
PearsonTestCase
(
TestCase
):
'''
Base class for tests running Pearson-related commands
'''
def
test_create_good_testcenter_user
(
self
):
username
=
"rusty"
# user = Mock(username=username)
# # id = unique_id_for_user(user)
# course = Mock(end_of_course_survey_url=survey_url)
newuser
=
User
.
objects
.
create_user
(
username
,
'rusty@edx.org'
,
'fakepass'
)
# newuser.first_name='Rusty'
# newuser.last_name='Skids'
# newuser.is_staff=True
# newuser.is_active=True
# newuser.is_superuser=True
# newuser.last_login=datetime(2012, 1, 1)
# newuser.date_joined=datetime(2011, 1, 1)
# newuser.save(using='default')
options
=
{
'first_name'
:
'TestFirst'
,
'last_name'
:
'TestLast'
,
'address_1'
:
'Test Address'
,
'city'
:
'TestCity'
,
'state'
:
'Alberta'
,
'postal_code'
:
'A0B 1C2'
,
'country'
:
'CAN'
,
'phone'
:
'252-1866'
,
'phone_country_code'
:
'1'
,
}
management
.
call_command
(
'pearson_make_tc_user'
,
username
,
options
)
\ No newline at end of file
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