Commit 4f0368f0 by Őry Máté

dashboard: fix pep8

parent 37704ac9
......@@ -59,29 +59,20 @@ class ViewUserTestCase(unittest.TestCase):
self.assertEquals(view(request, pk=1234).render().status_code, 200)
class ExpiredSigner(TimestampSigner):
def timestamp(self):
return baseconv.base62.encode(1)
@classmethod
def dumps(cls, obj, key=None, salt='django.core.signing', serializer=JSONSerializer, compress=False):
def dumps(cls, obj, key=None, salt='django.core.signing',
serializer=JSONSerializer, compress=False):
data = serializer().dumps(obj)
base64d = b64_encode(data)
return cls(key, salt=salt).sign(base64d)
class SubscribeTestCase(unittest.TestCase):
@patch.object(UnsubscribeFormView, 'get_object')
def test_change(self, go):
go.return_value = MagicMock(spec=Profile)
UnsubscribeFormView.get_token(1)
request = FakeRequestFactory(POST={'email_notifications': 'on'})
view(request)
self.assertTrue(go.return_value.email_notifications)
@patch.object(views.UnsubscribeFormView, 'get_queryset')
@patch.object(views.UnsubscribeFormView, 'form_valid')
def test_change(self, iv, gq):
......@@ -122,6 +113,7 @@ class SubscribeTestCase(unittest.TestCase):
request = FakeRequestFactory(POST={})
assert view(request, token=oldtoken)['location']
class VmOperationViewTestCase(unittest.TestCase):
def test_available(self):
......
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 sign in to comment