mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
test: add new tests to check if remove_language_code can remove region-specific codes
This commit is contained in:
@@ -31,3 +31,9 @@ class TestRemoveLanguageCode(TestCase):
|
||||
remove_language_code('/api/v2/endpoint'),
|
||||
'/api/v2/endpoint',
|
||||
)
|
||||
|
||||
def test_regional_code(self):
|
||||
self.assertEqual(remove_language_code('/es-ar/some/url/'), '/some/url/')
|
||||
|
||||
def test_long_regional_code(self):
|
||||
self.assertEqual(remove_language_code('/zh-hans/some/url/'), '/some/url/')
|
||||
|
||||
Reference in New Issue
Block a user