internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: fidals/shopelectro

Issue:
Adapt page usage to the new refarm pages interface
At https://github.com/fidals/refarm-site/issues/240 we changed page templates and page context interfaces.

Adapt site code to the new interface.



Discussion:
blocked by #699 

Resolving patch:
diff --git a/shopelectro/context.py b/shopelectro/context.py
--- a/shopelectro/context.py
+++ b/shopelectro/context.py
@@ -1,5 +1,3 @@
-from functools import partial
-
 from django.conf import settings
 from django.shortcuts import get_object_or_404
 
@@ -31,18 +29,15 @@ def __init__(self, page, tags: newcontext.Tags):
         self._tags = tags
 
     def context(self):
-        def template_context(page, tag_titles, tags):
-            return {
-                'page': page,
-                'tag_titles': tag_titles,
-                'tags': tags,
-            }
-
         tags_qs = self._tags.qs()
-        self._page.get_template_render_context = partial(
-            template_context, self._page, tags_qs.as_title(), tags_qs
-        )
-
+        # use dirty patch here, because it's the most simple method
+        # to make shared templates work.
+        # For example `templates/layout/metadata.html`.
+        self._page.display = {
+            'page': self._page,
+            'tag_titles': tags_qs.as_title(),
+            'tags': tags_qs,
+        }
         return {
             'page': self._page,
         }


Test patch:
diff --git a/shopelectro/tests/tests_selenium.py b/shopelectro/tests/tests_selenium.py
--- a/shopelectro/tests/tests_selenium.py
+++ b/shopelectro/tests/tests_selenium.py
@@ -1085,9 +1085,6 @@ def clear_input(self):
     def search(self):
         self.browser.find_element_by_class_name('search-form').submit()
         self.wait.until(EC.url_contains('/search/'))
-        self.wait.until(EC.visibility_of_element_located(
-            (By.TAG_NAME, 'h1')
-        ))
 
     def test_autocomplete_can_expand_and_collapse(self):
         self.fill_input()
@@ -1140,6 +1137,9 @@ def test_search_have_results(self):
         """Search results page should contain links on relevant pages."""
         self.fill_input()
         self.search()
+        self.wait.until(EC.visibility_of_element_located(
+            (By.CLASS_NAME, 'search-result-link')
+        ))
 
         self.assertTrue(self.browser.find_element_by_link_text(
             'Category #0 of #Category #0 of #Category #0'
@@ -1150,6 +1150,9 @@ def test_search_results_empty(self):
         """Search results for wrong term should contain empty result set."""
         self.input.send_keys('Not existing search query')
         self.search()
+        self.wait.until(EC.visibility_of_element_located(
+            (By.TAG_NAME, 'h1')
+        ))
 
         h1 = self.browser.find_element_by_tag_name('h1')
Repository: fidals/shopelectro

Issue:
Integrate Sentry to collect service log messages
https://github.com/fidals/shopelectro/issues/259#issuecomment-464351828


Discussion:
I will count the `sentry` bootstrapping as astronomical hours 

Resolving patch:
diff --git a/shopelectro/settings/base.py b/shopelectro/settings/base.py
--- a/shopelectro/settings/base.py
+++ b/shopelectro/settings/base.py
@@ -13,6 +13,10 @@
 import socket
 from datetime import datetime
 
+import sentry_sdk
+from sentry_sdk.integrations.django import DjangoIntegration
+from sentry_sdk.integrations.celery import CeleryIntegration
+
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(
     os.path.dirname(os.path.abspath(__file__))))
@@ -512,3 +516,13 @@ def get_robots_content():
     'TG_REPORT_ADDRESSEES', '@shopelectro_reports'
 ).split(',')
 CHECK_PURCHASE_RETRIES = int(os.environ.get('CHECK_PURCHASE_RETRIES', '3'))
+
+SENTRY_DSN = os.environ.get('SENTRY_DSN')
+if SENTRY_DSN:
+    sentry_sdk.init(
+        dsn=SENTRY_DSN,
+        integrations=[
+            DjangoIntegration(),
+            CeleryIntegration(),
+        ]
+    )


Test patch:
Repository: fidals/shopelectro

Issue:
Fix update_catalog
https://sentry.fidals.com/fidals/shopelectro/issues/13/?query=is:unresolved


Discussion:

Resolving patch:
diff --git a/shopelectro/migrations/0032_drop_tag_slug_uniq_constraint.py b/shopelectro/migrations/0032_drop_tag_slug_uniq_constraint.py
new file mode 100644
--- /dev/null
+++ b/shopelectro/migrations/0032_drop_tag_slug_uniq_constraint.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.20 on 2019-02-20 02:08
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('shopelectro', '0031_buff_tag_name'),
+    ]
+
+    operations = [
+        migrations.DeleteModel(
+            name='ExcludedModelTPage',
+        ),
+        migrations.AlterField(
+            model_name='tag',
+            name='slug',
+            field=models.SlugField(),
+        ),
+        migrations.AlterUniqueTogether(
+            name='tag',
+            unique_together=set([('slug', 'group'), ('name', 'group')]),
+        ),
+    ]


Test patch:
Repository: fidals/shopelectro

Issue:
Add sending mail action for given orders to admin panel
We have got connection issue with smtp and didn't notify 5 client
https://sentry.fidals.com/fidals/shopelectro/issues/36/


Discussion:

Resolving patch:
diff --git a/shopelectro/admin.py b/shopelectro/admin.py
--- a/shopelectro/admin.py
+++ b/shopelectro/admin.py
@@ -1,3 +1,4 @@
+from django.conf import settings
 from django.contrib import admin
 from django.contrib.admin.widgets import FilteredSelectMultiple
 from django.contrib.redirects.models import Redirect
@@ -8,6 +9,7 @@
 
 from django_select2.forms import ModelSelect2Widget
 
+from ecommerce import mailer
 from ecommerce.models import Position
 from pages.models import CustomPage, FlatPage, PageTemplate
 from generic_admin import inlines, mixins, models, sites
@@ -234,6 +236,27 @@ def custom_group(self, obj):
     custom_group.short_description = _('Group')
 
 
+def send_order_emails(admin_model, request, order_qs):
+    for order in order_qs:
+        context = {'shop': settings.SHOP}
+        if order.email:
+            mailer.send_order(
+                subject=settings.EMAIL_SUBJECTS['order'],
+                order=order,
+                extra_context=context,
+            )
+        else:
+            mailer.send_order(
+                subject=settings.EMAIL_SUBJECTS['one_click'],
+                order=order,
+                to_customer=False,
+                extra_context=context,
+            )
+
+
+send_order_emails.short_description = _('Sends email notifications about placed orders')
+
+
 class OrderAdmin(mixins.PermissionsControl):
 
     add = False
@@ -241,6 +264,7 @@ class OrderAdmin(mixins.PermissionsControl):
     list_display = ['id_', 'name', 'email', 'phone', 'total_price', 'payment_type', 'paid']
     search_fields = ['name', 'email', 'phone']
     list_display_links = ['name']
+    actions = [send_order_emails]
 
     def id_(self, obj):
         return obj.fake_order_number


Test patch:
Repository: fidals/shopelectro

Issue:
Unstable Ya.Metrica
- as for 27.02 shop had 11 real orders on mail and 8 ones counted with metric

Seems metric is unstable.

Possible solutions:
- add sentry monitoring for js code

![image](https://user-images.githubusercontent.com/3526796/53557448-02ff7380-3b57-11e9-8bab-db78468b4b88.png)



Discussion:
@duker33 What were these metrics? eCommerce or goal counter?
@artemiy312 , it's about goal counter
@duker33 , the goal counter could be easily blocked by adblock, so i just integrate sentry for js
@artemiy312 , y, it's good decision for this task

Resolving patch:
diff --git a/shopelectro/context_processors.py b/shopelectro/context_processors.py
--- a/shopelectro/context_processors.py
+++ b/shopelectro/context_processors.py
@@ -12,4 +12,5 @@ def shop(request):
         'shop': settings.SHOP,
         'DEBUG': settings.DEBUG,
         'BASE_URL': settings.BASE_URL,
+        'SENTRY_FRONT_DSN': settings.SENTRY_FRONT_DSN,
     }
diff --git a/shopelectro/settings/base.py b/shopelectro/settings/base.py
--- a/shopelectro/settings/base.py
+++ b/shopelectro/settings/base.py
@@ -516,6 +516,7 @@ def get_robots_content():
 CHECK_PURCHASE_RETRIES = int(os.environ.get('CHECK_PURCHASE_RETRIES', '3'))
 
 SENTRY_DSN = os.environ.get('SENTRY_DSN')
+SENTRY_FRONT_DSN = os.environ.get('SENTRY_FRONT_DSN')
 if SENTRY_DSN:
     sentry_sdk.init(
         dsn=SENTRY_DSN,


Test patch:
Repository: fidals/shopelectro

Issue:
Cart issues on prod
This is PO comments:

-----

заходишь на сайт, переходишь в товар. добавляешь его в корзину.  уходишь на другой товар, добавляешь его и переходишь. в корзину. ..., а его там нет



Discussion:

Resolving patch:
diff --git a/shopelectro/urls.py b/shopelectro/urls.py
--- a/shopelectro/urls.py
+++ b/shopelectro/urls.py
@@ -5,7 +5,7 @@
 from django.conf.urls import url, include
 from django.conf.urls.static import static
 from django.contrib.sitemaps.views import sitemap
-from django.views.decorators.cache import cache_page
+from django.views.decorators.cache import cache_page, never_cache
 
 from pages.views import RobotsView, SitemapPage
 from pages.urls import custom_page_url
@@ -103,9 +103,10 @@ def cache_page(arg):  # Ignore PyFlakesBear
     custom_page_url(r'^(?P<page>robots\.txt)$', RobotsView.as_view()),
     custom_page_url(r'^(?P<page>search)/$', views.Search.as_view()),
     custom_page_url(r'^(?P<page>catalog)/$', cached_2h(views.CategoryTree.as_view())),
-    custom_page_url(r'^shop/(?P<page>order)/$', views.OrderPage.as_view()),
-    custom_page_url(r'^shop/(?P<page>order-success)/$', views.OrderSuccess.as_view()),
     custom_page_url(r'^(?P<page>sitemap)/$', SitemapPage.as_view()),
+    # these pages should show only actual state
+    custom_page_url(r'^shop/(?P<page>order)/$', never_cache(views.OrderPage.as_view())),
+    custom_page_url(r'^shop/(?P<page>order-success)/$', never_cache(views.OrderSuccess.as_view())),
 ]
 
 urlpatterns = [


Test patch:
diff --git a/shopelectro/tests/tests_views.py b/shopelectro/tests/tests_views.py
--- a/shopelectro/tests/tests_views.py
+++ b/shopelectro/tests/tests_views.py
@@ -773,3 +773,18 @@ def test_admin_autocomplete_has_no_model_pages(self):
             f'?term={self.QUOTED_SIGNLE_RESULT_TERM}&pageType=category'
         )
         self.assertTrue(len(json_to_dict(response)) == 1)
+
+
+@tag('fast')
+class Order(TestCase):
+
+    fixtures = ['dump.json']
+
+    def test_disabled_cache(self):
+        """Cache-Control is disabled for the order page."""
+        # @todo #776:30m Create reverse_custom_page function.
+        url = reverse(CustomPage.ROUTE, kwargs={'page': 'order'})
+        self.assertEqual(
+            self.client.get(url)['Cache-Control'],
+            'max-age=0, no-cache, no-store, must-revalidate',
+        )
Repository: fidals/shopelectro

Issue:
Adapt catalog models to the new Product-Position hierarhy. stb2
Created the new hierarhy at https://github.com/fidals/refarm-site/issues/261


Discussion:
took `1` priority to make sites compatible with refarm again

Resolving patch:
diff --git a/shopelectro/models.py b/shopelectro/models.py
--- a/shopelectro/models.py
+++ b/shopelectro/models.py
@@ -56,7 +56,11 @@ def get_absolute_url(self):
         return reverse('category', args=(self.page.slug,))
 
 
-class Product(catalog_models.AbstractProduct, pages_models.SyncPageMixin):
+class Product(
+    catalog_models.AbstractProduct,
+    catalog_models.AbstractPosition,
+    pages_models.SyncPageMixin
+):
 
     # That's why we are needed to explicitly add objects manager here
     # because of Django special managers behaviour.


Test patch:
Repository: fidals/shopelectro

Issue:
Hide navigation page at the breadcrumbs
--

https://www.shopelectro.ru/pages/navigation/ зачем оно ? можем вложенные страницы поднять на уровень выше ? 

From this doc:
https://docs.google.com/document/d/1y4xUQhQ4V_Ln5xwcEB2zMp7KTUQnkn9agKTTAU1z0-c/edit



Discussion:

Resolving patch:
diff --git a/shopelectro/management/commands/excel.py b/shopelectro/management/commands/excel.py
--- a/shopelectro/management/commands/excel.py
+++ b/shopelectro/management/commands/excel.py
@@ -96,7 +96,7 @@ def hide_formulas(self):
 
     def write_catalog(self):
         """Write categories and products to sheet."""
-        categories = Category.objects.all().order_by('name').filter(children=None)
+        categories = Category.objects.active().order_by('name').filter(children=None)
         for category in categories.iterator():
             self.write_category_with_products(category)
 
diff --git a/shopelectro/sitemaps.py b/shopelectro/sitemaps.py
--- a/shopelectro/sitemaps.py
+++ b/shopelectro/sitemaps.py
@@ -1,3 +1,4 @@
+from datetime import datetime
 from typing import Generator, Tuple
 
 from django.contrib.sitemaps import Sitemap
@@ -24,6 +25,9 @@ class IndexSitemap(Sitemap):
     def items(self):
         return [CustomPage.objects.get(slug='')]
 
+    def lastmod(self, _):
+        return datetime.now()
+
 
 class CategorySitemap(AbstractSitemap):
 


Test patch:
diff --git a/shopelectro/tests/tests_views.py b/shopelectro/tests/tests_views.py
--- a/shopelectro/tests/tests_views.py
+++ b/shopelectro/tests/tests_views.py
@@ -462,7 +462,7 @@ def test_yandex_aviso_body(self):
 
 
 @tag('fast', 'catalog')
-class CategoryPage(BaseCatalogTestCase):
+class Category(BaseCatalogTestCase):
 
     fixtures = ['dump.json']
 
@@ -522,6 +522,21 @@ def test_tags_pagination_has_canonical_links(self):
             response, CANONICAL_HTML_TAG.format(path=not_paginated_url)
         )
 
+    def test_category_matrix_page(self):
+        """Matrix page should contain all second level categories."""
+        page = CustomPage.objects.get(slug='catalog')
+        response = self.client.get(page.url)
+        soup = BeautifulSoup(
+            response.content.decode('utf-8'),
+            'html.parser'
+        )
+        self.assertEqual(200, response.status_code)
+
+        categories_db = models.Category.objects.active()
+        categories_app = soup.find_all(tag='a', class_='catalog-list-item')
+        for from_db, from_app in zip(categories_db, categories_app):
+            self.assertEqual(from_db.name, from_app.a.text)
+
 
 @tag('fast')
 class IndexPage(TestCase):
Repository: fidals/shopelectro

Issue:
catalog.py:27-30: Create tests for the catalog matrix....
The puzzle `822-663573d7` from #822 has to be resolved: 

https://github.com/fidals/shopelectro/blob/c89b807552a45099cad752b4121f40d8836eb024/shopelectro/views/catalog.py#L27-L30

The puzzle was created by duker33 on 30-Apr-19. 

  

If you have any technical questions, don't ask me, submit new tickets instead. The task will be \"done\" when the problem is fixed and the text of the puzzle is _removed_ from the source code. Here is more about [PDD](http://www.yegor256.com/2009/03/04/pdd.html) and [about me](http://www.yegor256.com/2017/04/05/pdd-in-action.html). 



Discussion:
@artemiyds2 @duker33 please pay attention to this new issue.

Resolving patch:
diff --git a/shopelectro/views/catalog.py b/shopelectro/views/catalog.py
--- a/shopelectro/views/catalog.py
+++ b/shopelectro/views/catalog.py
@@ -18,16 +18,11 @@
 from shopelectro.exception import Http400
 from shopelectro.views.helpers import set_csrf_cookie
 
-
 # block numeric indexes to limit
 MATRIX_BLOCKS_TO_LIMIT = [3, 5]
 MATRIX_BLOCK_SIZE = 7
 
 
-# @todo #822:60m  Create tests for the catalog matrix.
-#  This cases are would be good to test:
-#  - Matrix sorting by page position
-#  - Block items limiting
 def category_matrix(request, page: str):
     assert page == 'catalog'
     roots = (


Test patch:
diff --git a/shopelectro/tests/tests_views.py b/shopelectro/tests/tests_views.py
--- a/shopelectro/tests/tests_views.py
+++ b/shopelectro/tests/tests_views.py
@@ -543,6 +543,46 @@ def test_category_matrix_page(self):
             self.assertEqual(from_db.name, from_app.a.text)
 
 
+@tag('fast', 'catalog')
+class CategoriesMatrix(BaseCatalogTestCase):
+
+    fixtures = ['dump.json']
+
+    def get_page(self):
+        return self.client.get(
+            path=reverse('custom_page', kwargs={'page': 'catalog'})
+        )
+
+    def get_soup(self) -> BeautifulSoup:
+        return BeautifulSoup(
+            self.get_page().content.decode('utf-8'),
+            'html.parser'
+        )
+
+    def test_roots_sorting(self):
+        soup = self.get_soup()
+        from_page = soup.find_all('h2')
+        from_db = (
+            models.Category.objects.bind_fields().active()
+            .filter(level=0)
+            .order_by('page__position', 'name')
+        ).values_list('name', flat=True)
+        self.assertEqual([c.text for c in from_page], list(from_db))
+
+    def test_second_level_sorting(self):
+        soup = self.get_soup()
+        from_page = soup.select('.second-level-category > a')
+        from_db = (
+            models.Category.objects.bind_fields().active()
+            .filter(level=1)
+            .order_by(
+                'parent__page__position', 'parent__name',
+                'page__position', 'name'
+            )
+        ).values_list('name', flat=True)
+        self.assertEqual([c.text for c in from_page], list(from_db))
+
+
 @tag('fast')
 class IndexPage(TestCase):
Repository: fidals/shopelectro

Issue:
Fix catalog matrix columns and links
https://www.shopelectro.ru/catalog/

- Every h2 on catalog matrix page should be clickable
- Matrix should take three columns everytime. Now it takes sometimes two, sometimes three columns
![image](https://user-images.githubusercontent.com/3526796/57689735-c10ba700-7648-11e9-9e9e-dddbabbbc272.png)



Discussion:

Resolving patch:
diff --git a/shopelectro/views/catalog.py b/shopelectro/views/catalog.py
--- a/shopelectro/views/catalog.py
+++ b/shopelectro/views/catalog.py
@@ -18,7 +18,6 @@
 from shopelectro.exception import Http400
 from shopelectro.views.helpers import set_csrf_cookie
 
-
 # block numeric indexes to limit
 MATRIX_BLOCKS_TO_LIMIT = [3, 5]
 MATRIX_BLOCK_SIZE = 7
@@ -41,7 +40,7 @@ def category_matrix(request, page: str):
     for i, root in enumerate(roots):
         children = root.children.active()
         # @todo #822:30m  Doc category matrix blocks.
-        matrix[root.name] = (
+        matrix[(root.name, root.url)] = (
             children
             if i not in MATRIX_BLOCKS_TO_LIMIT
             else children[:MATRIX_BLOCK_SIZE]


Test patch:
Repository: fidals/shopelectro

Issue:
Stale import db issue
PO says the last import was at `<yml_catalog date="2019-05-23 00:38">`
Check if import db can autolaunch.

Import db is called as catalog update command



Discussion:
it's screen from PO. PO screened it at `14:30 19.06`. Price was last updated at `14:30 18.06`.
May be it's the reason of stale price

![image](https://user-images.githubusercontent.com/3526796/59908541-54898200-9416-11e9-90a9-eea230b1bcd0.png)

`update_catalog` command fails with error. Seems 1C xml file structure changed again
https://sentry.fidals.com/fidals/shopelectro/issues/1021/

Resolving patch:
diff --git a/shopelectro/management/commands/_update_catalog/update_pack.py b/shopelectro/management/commands/_update_catalog/update_pack.py
--- a/shopelectro/management/commands/_update_catalog/update_pack.py
+++ b/shopelectro/management/commands/_update_catalog/update_pack.py
@@ -30,7 +30,7 @@ def update_prices(packs: TagQuerySet):
         packs.products().update(**fields_to_update)
 
 
-def main(*args, kwargs):
+def main(*args, **kwargs):
     uuid = 'ae30f766-0bb8-11e6-80ea-02d2cc20e118'
     pack_group = TagGroup.objects.filter(uuid=uuid).first()
     if not pack_group:


Test patch:
diff --git a/shopelectro/tests/tests_commands.py b/shopelectro/tests/tests_commands.py
--- a/shopelectro/tests/tests_commands.py
+++ b/shopelectro/tests/tests_commands.py
@@ -354,3 +354,8 @@ def test_utm_yandex(self):
         url = offer.find('url').text
         get_attrs = urllib.parse.parse_qs(url)
         self.assertEqual('cpc-market', get_attrs['utm_medium'][0])
+
+    def test_price_value(self):
+        offer = self.prices['YM'].offers_node[0]
+        product = Product.objects.get(vendor_code=offer.attrib['id'])
+        self.assertEqual(product.price, float(offer.find('price').text))
Repository: fidals/shopelectro

Issue:
Remarkup text collapsing on the product card
It's figma mockup: https://www.figma.com/file/OTnrbojXaRB0Ji6OlRR2WplG/ShopElectro?node-id=81%3A653

также необходимо добавить более плавную анимацию, т.к. сейчас текст дергается

Screen contains current markup
![image](https://user-images.githubusercontent.com/3526796/59919651-af2fd780-9430-11e9-9488-acd86edeb052.png)



Discussion:

Resolving patch:
diff --git a/shopelectro/views/catalog.py b/shopelectro/views/catalog.py
--- a/shopelectro/views/catalog.py
+++ b/shopelectro/views/catalog.py
@@ -104,6 +104,7 @@ def get_context_data(self, **kwargs):
             **product_images,
             'group_tags_pairs': self.product.get_params().items(),
             'tile_products': tile_products,
+            'tile_title': 'Вас может заинтересовать',
         }
 
     def get_images_context_data(self, products) -> dict:


Test patch:
Repository: fidals/shopelectro

Issue:
tests_selenium_mobile.py:161-162: Fix mobile cart. Now...
The puzzle `843-3cc08e76` from #843 has to be resolved: 

https://github.com/fidals/shopelectro/blob/bd9b654124b09163e5f1bb3a77f467fff56cffcd/shopelectro/tests/tests_selenium_mobile.py#L161-L162

The puzzle was created by duker33 on 17-Jun-19. 

Estimate: 60 minutes,  role: DEV. 

If you have any technical questions, don't ask me, submit new tickets instead. The task will be \"done\" when the problem is fixed and the text of the puzzle is _removed_ from the source code. Here is more about [PDD](http://www.yegor256.com/2009/03/04/pdd.html) and [about me](http://www.yegor256.com/2017/04/05/pdd-in-action.html). 



Discussion:
@artemiyds2 @duker33 please pay attention to this new issue.

Resolving patch:
diff --git a/shopelectro/context_processors.py b/shopelectro/context_processors.py
--- a/shopelectro/context_processors.py
+++ b/shopelectro/context_processors.py
@@ -11,6 +11,7 @@ def shop(request):
     return {
         'shop': settings.SHOP,
         'DEBUG': settings.DEBUG,
+        'TEST_ENV': settings.TEST_ENV,
         'base_url': settings.BASE_URL,
         'SENTRY_FRONT_DSN': settings.SENTRY_FRONT_DSN,
     }
diff --git a/shopelectro/settings/base.py b/shopelectro/settings/base.py
--- a/shopelectro/settings/base.py
+++ b/shopelectro/settings/base.py
@@ -36,7 +36,8 @@
 
 ALLOWED_HOSTS = ['*']
 
-if os.environ.get('TEST_ENV', False):
+TEST_ENV = os.environ.get('TEST_ENV', False)
+if TEST_ENV:
     # disable https in CI
     # https://docs.djangoproject.com/en/1.9/ref/settings/#secure-proxy-ssl-header
     SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'http')


Test patch:
diff --git a/shopelectro/tests/tests_selenium_mobile.py b/shopelectro/tests/tests_selenium_mobile.py
--- a/shopelectro/tests/tests_selenium_mobile.py
+++ b/shopelectro/tests/tests_selenium_mobile.py
@@ -7,7 +7,7 @@
 import unittest
 
 from django.conf import settings
-from django.test import LiveServerTestCase, override_settings, tag
+from django.test import LiveServerTestCase, tag
 from django.urls import reverse
 from selenium import webdriver
 from selenium.webdriver.common.by import By
@@ -158,12 +158,6 @@ def test_tags_collapse_state(self):
 
         self.assertFalse(any(t.is_displayed() for t in tags))
 
-    # @todo #843:60m  Fix mobile cart.
-    #  Now it's test fails
-    @unittest.skip
-    # CarrotQuest outer js service produces error on this test.
-    # Enabled debug makes it off.
-    @override_settings(DEBUG=True, INTERNAL_IPS=tuple())
     def test_cart(self):
         """Cart should updated after Product buy."""
         def get_cart_price_and_size():