mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Added tests for setting models.fields.FilePathField.path.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							bceadd2788
						
					
				
				
					commit
					11971cd87c
				
			
							
								
								
									
										12
									
								
								tests/model_fields/test_filepathfield.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								tests/model_fields/test_filepathfield.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| import os | ||||
|  | ||||
| from django.db.models import FilePathField | ||||
| from django.test import SimpleTestCase | ||||
|  | ||||
|  | ||||
| class FilePathFieldTests(SimpleTestCase): | ||||
|     def test_path(self): | ||||
|         path = os.path.dirname(__file__) | ||||
|         field = FilePathField(path=path) | ||||
|         self.assertEqual(field.path, path) | ||||
|         self.assertEqual(field.formfield().path, path) | ||||
		Reference in New Issue
	
	Block a user