mirror of
https://github.com/django/django.git
synced 2025-07-23 05:05:17 +00:00
12 lines
342 B
Python
12 lines
342 B
Python
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)
|