

def test_create_with_base64_prefix(self):
    '\n        Test for creating Base64 image in the server side\n        '
    now = datetime.datetime.now()
    file = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
    serializer = UploadedBase64ImageSerializer(data={
        'created': now,
        'file': uploaded_image,
    })
    uploaded_image = UploadedBase64Image(file=file, created=now)
    self.assertTrue(serializer.is_valid())
    self.assertEqual(serializer.validated_data['created'], uploaded_image.created)
    self.assertFalse((serializer.validated_data is uploaded_image))

dataset/ETHPy150Open Hipo/drf-extra-fields/tests/test_fields.py Base64ImageSerializerTests.test_create_with_base64_prefix/VarMisuse@41/118 `file`->`uploaded_image`