Skip to content

Commit

Permalink
Added tests for setting models.fields.FilePathField.path.
Browse files Browse the repository at this point in the history
  • Loading branch information
jajce authored and felixxm committed May 2, 2019
1 parent bceadd2 commit 11971cd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/model_fields/test_filepathfield.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 11971cd

Please sign in to comment.