def test_upload_photos(self):
        response = self.client.post(
            reverse('create_image'),
            {'file': get_in_memory_image_file()}
        )
        json_response = json.loads(response.content)
        self.assertTrue('filelink' in json_response[0].keys())
        self.assertTrue(
            json_response[0]['filelink'].startswith(settings.ORIGIN))
        self.assertTrue('id' in json_response[0].keys())
create_image should return JSON response with filelink and id.
dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_views.py/ImageViewsTest.test_upload_photos