Added tests for setting models.fields.FilePathField.path.
This commit is contained in:
parent
bceadd2788
commit
11971cd87c
|
@ -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