Skip to content

Commit

Permalink
#360 Fix commented test and refarm-site dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
duker33 committed Jun 22, 2018
1 parent f0e5567 commit ca151d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ua-parser==0.8.0
user-agents==1.1.0
sorl-thumbnail==12.4a1
https://github.com/selwin/django-user_agents/archive/master.zip
https://github.com/fidals/refarm-site/archive/0.1.6.zip
https://github.com/fidals/refarm-site/archive/0.1.3.zip
10 changes: 4 additions & 6 deletions shopelectro/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@

from bs4 import BeautifulSoup
from django.conf import settings
from django.contrib.sites.models import Site
from django.db.models import Q
from django.http import HttpResponse
from django.test import TestCase
from django.urls import reverse
from django.utils.translation import ugettext as _
from redirects.models import Redirect

from shopelectro.models import Category, Product, Tag, TagGroup, TagQuerySet, serialize_tags_to_url
from shopelectro.views.service import generate_md5_for_ya_kassa, YANDEX_REQUEST_PARAM
Expand Down Expand Up @@ -523,7 +525,8 @@ class Redirects(TestCase):

fixtures = ['dump.json']

@unittest.expectedFailure('rf#140 task will resurrect it')
# rf#140 task will resurrect this test
@unittest.expectedFailure
def test_redirect_on_existing_page(self):
"""DB based redirect from existing url should do, but should not avoid it."""
# take some existing `url_from`
Expand All @@ -532,11 +535,6 @@ def test_redirect_on_existing_page(self):
self.assertEqual(response.status_code, 200)

# create redirect from `url_from` to another existing one - `url_to`
from django.contrib.redirects.models import Redirect
from django.contrib.sites.models import Site

# Site.objects.create(domain='shopelectro.ru', name='shopelectro')

url_to = '/catalog/categories/category-0/'
Redirect.objects.create(
site=Site.objects.first(),
Expand Down

0 comments on commit ca151d5

Please sign in to comment.