def test_get_by_cdn_url(self, request): request.return_value = MockResponse(status=200) get_file(arg_namespace('get https://ucarecdn.com/6c5e9526-b0fe-4739-8975-72e8d5ee6342/')) self.assertEqual( request.mock_calls[0][1][1:], ('GET', 'https://api.uploadcare.com/files/6c5e9526-b0fe-4739-8975-72e8d5ee6342/') )
def test_get_by_uuid(self, request): request.return_value = MockResponse(status=200) get_file(arg_namespace('get 6c5e9526-b0fe-4739-8975-72e8d5ee6342')) self.assertEqual(request.mock_calls[0][1][1:], ( 'GET', 'https://api.uploadcare.com/files/6c5e9526-b0fe-4739-8975-72e8d5ee6342/' ))