cleaned flake format errors
@@ -17,7 +17,8 @@ import urllib
class ViewTests(TestCase):
def setUp(self):
- self.user = User.objects.create(username='testuser', email='testuser@example.com')
+ self.user = User.objects.create(username='testuser',
+ email='testuser@example.com')
self.user.set_password('password')
self.user.save()
profile = self.user.userprofile
@@ -37,7 +38,8 @@ class ViewTests(TestCase):
# sample request with mocked ip address
self.request.META = {
- 'HTTP_X_FORWARDED_FOR': '192.168.255.182, 10.0.0.0, 127.0.0.1, 198.84.193.157, '
+ 'HTTP_X_FORWARDED_FOR': '192.168.255.182, 10.0.0.0,' +
+ '127.0.0.1, 198.84.193.157, '
'177.139.233.139',
'HTTP_X_REAL_IP': '177.139.233.132',
'REMOTE_ADDR': '177.139.233.133',
@@ -59,8 +61,9 @@ class ViewTests(TestCase):
res_id = 'D7a7de92941a044049a7b8ad09f4c75bb'
res_type = 'GenericResource'
app_name = 'test'
- request_url = 'https://apps.hydroshare.org/apps/hydroshare-gis/' +
+ request_url = 'https://apps.hydroshare.org/apps/hydroshare-gis/' \
'?res_id=%s&res_type=%s' % (res_id, res_type)
+
app_url = urllib.quote(request_url)
href = 'url=%s;name=%s' % (app_url, app_name)
r.GET = QueryDict(href)
@@ -97,7 +100,8 @@ class ViewTests(TestCase):
class TrackingTests(TestCase):
def setUp(self):
- self.user = User.objects.create(username='testuser', email='testuser@example.com')
+ self.user = User.objects.create(username='testuser',
+ email='testuser@example.com')
self.user.set_password('password')
self.user.save()
profile = self.user.userprofile
@@ -117,7 +121,8 @@ class TrackingTests(TestCase):
# sample request with mocked ip address
request.META = {
- 'HTTP_X_FORWARDED_FOR': '192.168.255.182, 10.0.0.0, 127.0.0.1, 198.84.193.157, '
+ 'HTTP_X_FORWARDED_FOR': '192.168.255.182, 10.0.0.0, ' +
+ '127.0.0.1, 198.84.193.157, '
'177.139.233.139',
'HTTP_X_REAL_IP': '177.139.233.132',
'REMOTE_ADDR': '177.139.233.133',
