Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ticket9: pep8

  • Loading branch information...
commit be9dde8d8c8821434e5d39ec58ff35d5abcd06c2 1 parent aa75af9
@andreysobol authored
View
6 testsobol/mainapp/templatetags/my_tags.py
@@ -1,8 +1,10 @@
from django.template import Library, Node, Variable
from django.core.urlresolvers import reverse
+
register = Library()
+
class EditAdmin(Node):
def __init__(self, edit):
@@ -10,7 +12,9 @@ def __init__(self, edit):
def render(self, context):
e = self.edit.resolve(context)
- return u'<a href="%s">Edit</a>' % reverse('admin:%s_%s_change' % (e._meta.app_label, e._meta.module_name), args=(e.id,))
+ return u'<a href="%s">Edit</a>' %\
+ reverse('admin:%s_%s_change' %\
+ (e._meta.app_label, e._meta.module_name), args=(e.id,))
def ed(parser, token):
View
8 testsobol/mainapp/tests.py
@@ -122,12 +122,12 @@ def test(self):
class Tag(TestCase):
def test(self):
- fixtures = ['initial_data.json']
-
- page = self.client.post('/accounts/login/', {'username': 'admin', 'password': 'admin'})
+ page = self.client.post('/accounts/login/',
+ {'username': 'admin', 'password': 'admin'})
page = self.client.get('/')
- self.assertTrue(page.content.find('<a href="/admin/auth/user/1/"') != -1 )
+ self.assertTrue(page.content.find(
+ '<a href="/admin/auth/user/1/"') != -1)
class NameUrlTest(TestCase):
Please sign in to comment.
Something went wrong with that request. Please try again.