mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							
								
								
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										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> | ||||
|   | ||||
| @@ -113,7 +113,7 @@ class LiveServerViews(LiveServerBase): | ||||
|         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 @@ class LiveServerViews(LiveServerBase): | ||||
|         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 @@ class LiveServerViews(LiveServerBase): | ||||
|         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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user