diff options
| author | Mykola Kokalko <jajcee@gmail.com> | 2019-05-02 10:34:10 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-05-02 11:11:50 +0200 |
| commit | 11971cd87c6cb208325d28ddf7e663dadde77d68 (patch) | |
| tree | 9755191feeb6815321eb2b89e83cce4a12ef8d3d | |
| parent | bceadd2788dc2dad53eba0caae172bd8522fd483 (diff) | |
Added tests for setting models.fields.FilePathField.path.
| -rw-r--r-- | tests/model_fields/test_filepathfield.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/model_fields/test_filepathfield.py b/tests/model_fields/test_filepathfield.py new file mode 100644 index 0000000000..d5d43ff6f6 --- /dev/null +++ b/tests/model_fields/test_filepathfield.py @@ -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) |
