mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Added tests for setting models.fields.FilePathField.path.
This commit is contained in:
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)
|
Loading…
Reference in New Issue
Block a user