def test_serializer_errors_has_only_invalid_data_error(self):
        serializer = ValidationSerializer(data='invalid data')
        self.assertFalse(serializer.is_valid())
        self.assertDictEqual(serializer.errors, {
            'non_field_errors': [
                'Invalid data. Expected a dictionary, but got %s.' % type('').__name__
            ]
        })


# regression tests for issue: 1493
dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validation.py/TestAvoidValidation.test_serializer_errors_has_only_invalid_data_error/original