53 lines
1.9 KiB
Diff
53 lines
1.9 KiB
Diff
|
|
Index: django-assets-2.0/tests/__init__.py
|
||
|
|
===================================================================
|
||
|
|
--- django-assets-2.0.orig/tests/__init__.py
|
||
|
|
+++ django-assets-2.0/tests/__init__.py
|
||
|
|
@@ -1,4 +1,4 @@
|
||
|
|
-from nose import SkipTest
|
||
|
|
+from unittest import SkipTest
|
||
|
|
try:
|
||
|
|
import django
|
||
|
|
except ImportError:
|
||
|
|
Index: django-assets-2.0/tests/test_django.py
|
||
|
|
===================================================================
|
||
|
|
--- django-assets-2.0.orig/tests/test_django.py
|
||
|
|
+++ django-assets-2.0/tests/test_django.py
|
||
|
|
@@ -1,7 +1,6 @@
|
||
|
|
# -*- coding: utf-8 -*-
|
||
|
|
from __future__ import unicode_literals
|
||
|
|
-from nose import SkipTest
|
||
|
|
-from nose.tools import assert_raises, assert_raises_regexp
|
||
|
|
+from unittest import SkipTest
|
||
|
|
|
||
|
|
from django.conf import settings
|
||
|
|
from django.contrib.staticfiles import finders
|
||
|
|
@@ -239,7 +238,12 @@ class TestStaticFiles(TempEnvironmentHel
|
||
|
|
"""
|
||
|
|
settings.ASSETS_DEBUG = False
|
||
|
|
bundle = self.mkbundle('file1', 'file2', output="out")
|
||
|
|
- assert_raises(BundleError, bundle.build)
|
||
|
|
+ try:
|
||
|
|
+ bundle.build()
|
||
|
|
+ except BundleError:
|
||
|
|
+ pass
|
||
|
|
+ else:
|
||
|
|
+ raise AssertionError("BundleError not raised")
|
||
|
|
|
||
|
|
# After creating the files in the static root directory,
|
||
|
|
# it works (we only look there in production).
|
||
|
|
@@ -264,8 +268,12 @@ class TestStaticFiles(TempEnvironmentHel
|
||
|
|
"""An error is raised if a source file is missing.
|
||
|
|
"""
|
||
|
|
bundle = self.mkbundle('xyz', output="out")
|
||
|
|
- assert_raises_regexp(
|
||
|
|
- BundleError, 'using staticfiles finders', bundle.build)
|
||
|
|
+ try:
|
||
|
|
+ bundle.build()
|
||
|
|
+ except BundleError as e:
|
||
|
|
+ assert "using staticfiles finders" in str(e)
|
||
|
|
+ else:
|
||
|
|
+ raise AssertionError("BundleError not raised")
|
||
|
|
|
||
|
|
def test_serve_built_files(self):
|
||
|
|
"""The files we write to STATIC_ROOT are served in debug mode
|