Commit fc221a09 by Jay Zoldak

Merge pull request #1848 from MITx/fix/zoldak/test-login-pylint

Fix pylint errors
parents 7e35bf19 1cc6a0a6
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment