Skip to content
Browse files

Fixed #18326 -- Stripped ending chars in LiveServerViews tests.

Ending chars might be different depending on git crlf setting.
Thanks Michael Manfre for the report and the patch.
  • Loading branch information...
1 parent eb0140b commit 006c2b8fc166e53d4ffccda9c42ef9fc109e1c8d @claudep claudep committed
Showing with 4 additions and 3 deletions.
  1. +1 −0 AUTHORS
  2. +3 −3 tests/regressiontests/servers/tests.py
View
1 AUTHORS
@@ -347,6 +347,7 @@ answer newbie questions, and generally made Django that much better:
Frantisek Malina <vizualbod@vizualbod.com>
Mike Malone <mjmalone@gmail.com>
Martin Maney <http://www.chipy.org/Martin_Maney>
+ Michael Manfre <mmanfre@gmail.com>
masonsimon+django@gmail.com
Manuzhai
Petr Marhoun <petr.marhoun@gmail.com>
View
6 tests/regressiontests/servers/tests.py
@@ -113,7 +113,7 @@ def test_view(self):
Refs #2879.
"""
f = self.urlopen('/example_view/')
- self.assertEqual(f.read(), 'example view')
+ self.assertEqual(f.read(), b'example view')
def test_static_files(self):
"""
@@ -121,7 +121,7 @@ def test_static_files(self):
Refs #2879.
"""
f = self.urlopen('/static/example_static_file.txt')
- self.assertEqual(f.read(), 'example static file\n')
+ self.assertEqual(f.read().rstrip(b'\r\n'), b'example static file')
def test_media_files(self):
"""
@@ -129,7 +129,7 @@ def test_media_files(self):
Refs #2879.
"""
f = self.urlopen('/media/example_media_file.txt')
- self.assertEqual(f.read(), 'example media file\n')
+ self.assertEqual(f.read().rstrip(b'\r\n'), b'example media file')
class LiveServerDatabase(LiveServerBase):

0 comments on commit 006c2b8

Please sign in to comment.
Something went wrong with that request. Please try again.