mirror of
https://github.com/Hopiu/django.git
synced 2026-05-04 13:44:44 +00:00
13 lines
342 B
Python
13 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)
|