def test_validation_error_with_non_file(self):
        now = datetime.datetime.now()
        errmsg = "Please upload a valid image."
        serializer = UploadedBase64ImageSerializer(data={'created': now,
                                                         'file': 'abc'})
        self.assertFalse(serializer.is_valid())
        self.assertEqual(serializer.errors, {'file': [errmsg]})
Passing non-base64 should raise a validation error.
dataset/ETHPy150Open Hipo/drf-extra-fields/tests/test_fields.py/Base64ImageSerializerTests.test_validation_error_with_non_file