diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py
index a0b4593..1cfee91 100644
a
|
b
|
from decimal import Decimal
|
3 | 3 | |
4 | 4 | from django import test |
5 | 5 | from django import forms |
6 | | from django.core.exceptions import ValidationError |
| 6 | from django.core.exceptions import FieldError, ValidationError |
7 | 7 | from django.db import models |
8 | 8 | from django.db.models.fields.files import FieldFile |
9 | 9 | from django.utils import unittest |
… |
… |
class FileFieldTests(unittest.TestCase):
|
348 | 348 | field = d._meta.get_field('myfile') |
349 | 349 | field.save_form_data(d, 'else.txt') |
350 | 350 | self.assertEqual(d.myfile, 'else.txt') |
| 351 | |
| 352 | class FieldErrorTest(unittest.TestCase): |
| 353 | def test_field_error(self): |
| 354 | self.assertRaises(FieldError, Post.objects.order_by, 'nonexistant_field') |
| 355 | |