def test_not_required(self):
        field = serializers.IntegerField(required=False)
        with pytest.raises(serializers.SkipField):
            field.run_validation()
Just like self.assertTrue(a > b), but with a nicer default message.
dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_fields.py/TestEmpty.test_not_required--crossover with--dataset/ETHPy150Open locustio/locust/locust/test/testcases.py/LocustTestCase.assertGreater