Use print() function in both Python 2 and Python 3
This commit is contained in:
@@ -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, '')
|
||||
|
||||
Reference in New Issue
Block a user