From 91051e9be42e000763d3b25bd25d33aa264ddedd Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Sun, 6 Nov 2016 19:32:35 -0500 Subject: [PATCH] Update unknown fields test to handle multiple fields --- tests/test_filterset.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_filterset.py b/tests/test_filterset.py index aa41956..75bbcb6 100644 --- a/tests/test_filterset.py +++ b/tests/test_filterset.py @@ -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):