Permalink
Browse files

ticket9: pep8

  • Loading branch information...
1 parent aa75af9 commit be9dde8d8c8821434e5d39ec58ff35d5abcd06c2 @andreysobol committed Mar 11, 2012
Showing with 9 additions and 5 deletions.
  1. +5 −1 testsobol/mainapp/templatetags/my_tags.py
  2. +4 −4 testsobol/mainapp/tests.py
@@ -1,16 +1,20 @@
from django.template import Library, Node, Variable
from django.core.urlresolvers import reverse
+
register = Library()
+
class EditAdmin(Node):
def __init__(self, edit):
self.edit = Variable(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):
@@ -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):

0 comments on commit be9dde8

Please sign in to comment.