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
fc221a09
Commit
fc221a09
authored
Apr 12, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1848 from MITx/fix/zoldak/test-login-pylint
Fix pylint errors
parents
7e35bf19
1cc6a0a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lms/djangoapps/courseware/tests/test_login.py
+5
-4
No files found.
lms/djangoapps/courseware/tests/test_login.py
View file @
fc221a09
from
django.test
import
TestCase
from
django.test
import
TestCase
from
django.test.client
import
Client
from
django.test.client
import
Client
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
factories
import
UserFactory
,
RegistrationFactory
,
UserProfileFactory
from
courseware.tests.
factories
import
UserFactory
,
RegistrationFactory
,
UserProfileFactory
import
json
import
json
...
@@ -17,9 +17,7 @@ class LoginTest(TestCase):
...
@@ -17,9 +17,7 @@ class LoginTest(TestCase):
self
.
user
.
save
()
self
.
user
.
save
()
# Create a registration for the user
# Create a registration for the user
registration
=
RegistrationFactory
(
user
=
self
.
user
)
RegistrationFactory
(
user
=
self
.
user
)
registration
.
register
(
self
.
user
)
registration
.
activate
()
# Create a profile for the user
# Create a profile for the user
UserProfileFactory
(
user
=
self
.
user
)
UserProfileFactory
(
user
=
self
.
user
)
...
@@ -73,6 +71,9 @@ class LoginTest(TestCase):
...
@@ -73,6 +71,9 @@ class LoginTest(TestCase):
response
=
self
.
_login_response
(
'test@edx.org'
,
unicode_password
)
response
=
self
.
_login_response
(
'test@edx.org'
,
unicode_password
)
self
.
_assert_response
(
response
,
success
=
False
)
self
.
_assert_response
(
response
,
success
=
False
)
'''
Post the login info
'''
def
_login_response
(
self
,
email
,
password
):
def
_login_response
(
self
,
email
,
password
):
post_params
=
{
'email'
:
email
,
'password'
:
password
}
post_params
=
{
'email'
:
email
,
'password'
:
password
}
return
self
.
client
.
post
(
self
.
url
,
post_params
)
return
self
.
client
.
post
(
self
.
url
,
post_params
)
...
...
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