Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction to region list. #164

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion common/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
"asia-south1",
"asia-southeast1",
"australia-southeast1",
"europe",
"eu",
"europe-west2",
"europe-west3",
"europe-west6",
"me-central2",
"me-west1",
"northamerica-northeast2",
"us",
)

Expand Down
16 changes: 8 additions & 8 deletions common/regions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def test_url_asia_southeast1(self):
regions.url("https://test", "asia-southeast1"),
"https://asia-southeast1-test")

def test_url_europe(self):
def test_url_eu(self):
self.assertEqual(
regions.url("https://test", "europe"), "https://europe-test")
regions.url("https://test", "eu"), "https://eu-test")

def test_url_us(self):
self.assertEqual(regions.url("https://test", "us"), "https://test")
Expand All @@ -39,17 +39,17 @@ def test_url_always_prepend_region_us(self):
"https://us-test",
)

def test_url_always_prepend_region_europe(self):
def test_url_always_prepend_region_e(self):
self.assertEqual(
regions.url_always_prepend_region("https://test", "europe"),
"https://europe-test",
regions.url_always_prepend_region("https://test", "eu"),
"https://eu-test",
)

def test_url_always_prepend_region_twice(self):
url_once = regions.url_always_prepend_region("https://test", "europe")
url_twice = regions.url_always_prepend_region(url_once, "europe")
url_once = regions.url_always_prepend_region("https://test", "eu")
url_twice = regions.url_always_prepend_region(url_once, "eu")
self.assertEqual(
"https://europe-test",
"https://eu-test",
url_twice,
)

Expand Down
Loading