

def test_create(self):
    '\n        Test for creating Base64 image in the server side\n        '
    now = datetime.datetime.now()
    file = 'R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
    serializer = UploadedBase64ImageSerializer(data={
        'created': now,
        'file': file,
    })
    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/original