Use print() function in both Python 2 and Python 3

This commit is contained in:
cclauss
2019-01-13 17:16:37 +01:00
parent 77bc40fe95
commit 8fca11b85c
56 changed files with 300 additions and 244 deletions

View File

@@ -1,6 +1,7 @@
"""
Tests for the rss_proxy views
"""
from __future__ import print_function
from django.urls import reverse
from django.test import TestCase
from mock import Mock, patch
@@ -56,9 +57,9 @@ class RssProxyViewTests(TestCase):
"""
mock_requests_get.return_value = Mock(status_code=404)
resp = self.client.get('%s?url=%s' % (reverse('rss_proxy:proxy'), self.whitelisted_url2))
print resp.status_code
print resp.content
print resp['Content-Type']
print(resp.status_code)
print(resp.content)
print(resp['Content-Type'])
self.assertEqual(resp.status_code, 404)
self.assertEqual(resp['Content-Type'], 'application/xml')
self.assertEqual(resp.content, '')