Update unknown fields test to handle multiple fields

This commit is contained in:
Ryan P Kilby 2016-11-06 19:32:35 -05:00
parent 4b5bc1ad78
commit 91051e9be4
1 changed files with 6 additions and 3 deletions

View File

@ -428,9 +428,12 @@ class FilterSetClassCreationTests(TestCase):
class Meta:
model = Book
fields = ('username', 'price', 'other', 'another')
self.assertEqual(excinfo.exception.args, (
"Meta.fields contains a field that isn't defined "
"on this FilterSet: other",))
self.assertEqual(
str(excinfo.exception),
"'Meta.fields' contains fields that are not defined on this FilterSet: "
"other, another"
)
def test_meta_fields_dictionary_containing_unknown(self):
with self.assertRaises(TypeError):