def test_missing_field(self):
        class TestSerializer(serializers.ModelSerializer):
            missing = serializers.ReadOnlyField()

            class Meta:
                model = RegularFieldsModel
                fields = ('auto_field',)

        with self.assertRaises(AssertionError) as excinfo:
            TestSerializer().fields
        expected = (
            "The field 'missing' was declared on serializer TestSerializer, "
            "but has not been included in the 'fields' option."
        )
        assert str(excinfo.exception) == expected
List available snapshots for certain vm or for all.
dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_model_serializer.py/TestRegularFieldMappings.test_missing_field--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/list_snapshots