Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
python-django-pyscss
crashing_templates.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File crashing_templates.patch of Package python-django-pyscss
--- a/testproject/testproject/settings.py +++ b/testproject/testproject/settings.py @@ -27,7 +27,9 @@ SECRET_KEY = 'testproject' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = True +TEMPLATES = { + 'DEBUG': True +} ALLOWED_HOSTS = [] @@ -59,6 +61,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) +MIDDLEWARE = MIDDLEWARE_CLASSES ROOT_URLCONF = 'testproject.testproject.urls' --- a/tests/test_scss.py +++ b/tests/test_scss.py @@ -1,6 +1,9 @@ import os import re -import mock +try: + import mock +except ImportError: + import unittest.mock as mock import six from django.test import TestCase @@ -128,6 +131,10 @@ INLINED_IMAGE_EXPECTED = """ background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVR4nKXTzUojQRDA8X9/zJCIECRfiDCDBHKZq+QR8nJ5Hl/AQ2QgxyCOoCAy8eIkAxLy0dPWnkzQ7JpdtqAv3fSP6qouJSL8T9jvGy8vLzKdTsmyjDzPGY1G6q+B29tbubm5YTab4b3n4+Njd1ZVlYgIWmuMMeoASNNUrq+vWa/XDAYDkiTh8vJyByil8N7jnCMMQ7HWqh2Q57mMx2OccwyHQ4bD4UHaxhglIuKcY71eU6/XxRijNMDDwwNFUXB1dfXby7t0rVVaa5xzbDYbADTA8/MzWmuSJPmpXp8IVVXtAAtQFAVBEBBF0VEgDENVVZV47/eA1hprLUr92DEAvPfinENrvX/C+fk5QRAwm82OAqvVCuccxpg9EMcxxhienp6OAmVZst1uCcNwD/R6PbrdLo+Pj0wmkz/+7dfXV3l7e8Nay8nJCQDqcxbu7u4kTVNEhH6/TxzHdDodlFKUZclisWA+n1Or1YiiiGazqb4AAPf395JlGe/v71hrCcPwy2o0GlxcXNDpdHbVVt+ncT6fS57nFEXBcrkkCALOzs5otVq0221OT0+/tOoA+Nf4BawEx9v4UlbsAAAAAElFTkSuQmCC) center no-repeat; } """ +INLINED_IMAGE_EXPECTED_02 = '''.loading { + background: url(/static/scss/images/loading.gif) center no-repeat; +} +''' SPRITE_MAP = """ $widgets: sprite-map('images/icons/widget-*.png'); @@ -145,7 +152,11 @@ $widgets: sprite-map('images/icons/widge class AssetsTest(CompilerTestMixin, TestCase): def test_inline_image(self): actual = self.compiler.compile_string(INLINE_IMAGE) - self.assertEqual(clean_css(actual), clean_css(INLINED_IMAGE_EXPECTED)) + if six.PY2: + self.assertEqual(clean_css(actual), clean_css(INLINED_IMAGE_EXPECTED)) + else: + self.assertEqual(clean_css(actual), + clean_css(INLINED_IMAGE_EXPECTED_02)) def test_sprite_images(self): actual = self.compiler.compile_string(SPRITE_MAP) --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from setuptools import setup, find_packages import os +import sys __doc__ = "Makes it easier to use PySCSS in Django." @@ -22,9 +23,10 @@ except ImportError: tests_require = [ 'Pillow', 'django-compressor>=1.3', - 'mock', ] +if sys.version_info[0] >= 3: + tests_require.append('mock') version = '2.0.2'
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor