Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antonagestam committed Jan 4, 2017
1 parent f35e63c commit d381251
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion collectfast/etag.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import hashlib
from functools import lru_cache

from django.core.cache import caches

from collectfast import settings
from .log import log

try:
from functools import lru_cache
except ImportError:
# make lru_cache do nothing in python 2.7
def lru_cache(maxsize=128, typed=False):
def decorator(func):
return func
return decorator

cache = caches[settings.cache]


Expand Down
3 changes: 2 additions & 1 deletion collectfast/tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

def call_collectstatic():
out = StringIO()
call_command('collectstatic', '--no-input', stdout=out)
call_command('collectstatic', interactive=False, stdout=out)
return out.getvalue()


@test
def test_basics(case):
create_static_file('static/testfile.txt')
Expand Down
1 change: 0 additions & 1 deletion collectfast/tests/test_etag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import unittest
import string
import tempfile

Expand Down

0 comments on commit d381251

Please sign in to comment.