Skip to content

Saleor Core: the high performance, composable, headless commerce API.

WIP

Pacu29ab9ede68e63
diff --git a/saleor/settings.py b/saleor/settings.py
index 73fa0a5f12..35104d86fc 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -43,7 +43,7 @@ DATABASES = {
TIME_ZONE = 'America/Chicago'
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'en'
LANGUAGES = [
('bg', _('Bulgarian')),
('de', _('German')),
diff --git a/tests/utils.py b/tests/utils.py
index 7461ea05e3..f79b74b5f5 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,14 +1,18 @@
import json
+from urllib.parse import urlparse
-from django.conf import settings
from django.db.models import Q
-from django.urls import translate_url
from django.utils.encoding import smart_text
+def get_url_path(url):
+ parsed_url = urlparse(url)
+ return parsed_url.path
+
+
def get_redirect_location(response):
- path = response['Location']
- return translate_url(path, lang_code=settings.LANGUAGE_CODE)
+ # Due to Django 1.8 compatibility, we have to handle both cases
+ return get_url_path(response['Location'])
def filter_products_by_attribute(queryset, attribute_id, value):