1
0
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:
Mykola Kokalko 2019-05-02 10:34:10 +02:00 committed by Mariusz Felisiak
parent bceadd2788
commit 11971cd87c

View 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)