Skip to content

Commit 1818c4b

Browse files
committed
black + PyCharm 'optimize imports' + remove print
1 parent dfdf0f8 commit 1818c4b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

polls/tests.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.test import TestCase
44
from django.utils import timezone
55

6-
from .models import Poll, Choice, Vote
6+
from .models import Poll, Vote
77

88

99
class PollModelTest(TestCase):
@@ -24,16 +24,21 @@ def test_home(self):
2424

2525
def test_login(self):
2626
User.objects.create_user(username='john', password='rambo')
27-
response = self.client.post('/accounts/login/', {'username': 'john', 'password': 'rambo'})
27+
response = self.client.post(
28+
'/accounts/login/', {'username': 'john', 'password': 'rambo'}
29+
)
2830
self.assertRedirects(response, '/')
2931

3032
def test_register(self):
31-
# print(response.context['messages'])
32-
response = self.client.post('/accounts/register/', {'username': 'johny',
33-
'password1': 'rambo',
34-
'password2': 'rambo',
35-
'email': 'johny.rambo@usarmy.gov'
36-
})
33+
response = self.client.post(
34+
'/accounts/register/',
35+
{
36+
'username': 'johny',
37+
'password1': 'rambo',
38+
'password2': 'rambo',
39+
'email': 'johny.rambo@usarmy.gov',
40+
},
41+
)
3742
self.assertRedirects(response, '/accounts/login/')
3843
# assert that user got actually created in the backend
3944
self.assertIsNotNone(authenticate(username='johny', password='rambo'))

0 commit comments

Comments
 (0)