This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit b0035ebf8ea327c006d840a5061ecebc809ec904
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Mon Jul 31 15:01:42 2023 +0200

    Add test case for get_endpoint() and use_internal_url=True.
---
 libcloud/test/storage/test_cloudfiles.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libcloud/test/storage/test_cloudfiles.py 
b/libcloud/test/storage/test_cloudfiles.py
index 4187d9003..df4a73e5d 100644
--- a/libcloud/test/storage/test_cloudfiles.py
+++ b/libcloud/test/storage/test_cloudfiles.py
@@ -123,6 +123,14 @@ class CloudFilesTests(unittest.TestCase):
         )
         self.driver.connection.cdn_request = False
 
+    def test_get_endpoint_internalurl(self):
+        self.driver.connection.use_internal_url = True
+        url = (
+            
"https://snet-storage101.%s1.clouddrive.com/v1/MossoCloudFS_11111-111111111-1111111111-1111111";
+            % (self.region)
+        )
+        self.assertEqual(url, self.driver.connection.get_endpoint())
+
     def test_list_containers(self):
         CloudFilesMockHttp.type = "EMPTY"
         containers = self.driver.list_containers()

Reply via email to