mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-18 04:20:51 +03:00
Fix test failure due to favicon.ico being opened by DjangoCookieTestCase.check_paths().
This commit is contained in:
parent
1c1ca39618
commit
7e8f58d6ec
|
@ -1,6 +1,7 @@
|
||||||
cookiecutter==1.2.1
|
cookiecutter==1.2.1
|
||||||
flake8==2.5.0
|
flake8==2.5.0
|
||||||
sh
|
sh
|
||||||
|
binaryornot==0.4.0
|
||||||
|
|
||||||
# Debugging
|
# Debugging
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
|
|
|
@ -4,6 +4,7 @@ import shutil
|
||||||
import unittest
|
import unittest
|
||||||
from os.path import exists, dirname, join
|
from os.path import exists, dirname, join
|
||||||
|
|
||||||
|
from binaryornot.check import is_binary
|
||||||
import sh
|
import sh
|
||||||
|
|
||||||
from cookiecutter.main import cookiecutter
|
from cookiecutter.main import cookiecutter
|
||||||
|
@ -26,11 +27,12 @@ class DjangoCookieTestCase(unittest.TestCase):
|
||||||
|
|
||||||
# Assert that no match is found in any of the files
|
# Assert that no match is found in any of the files
|
||||||
for path in paths:
|
for path in paths:
|
||||||
for line in open(path, 'r'):
|
if not is_binary(path):
|
||||||
match = re_obj.search(line)
|
for line in open(path, 'r'):
|
||||||
self.assertIsNone(
|
match = re_obj.search(line)
|
||||||
match,
|
self.assertIsNone(
|
||||||
"cookiecutter variable not replaced in {}".format(path))
|
match,
|
||||||
|
"cookiecutter variable not replaced in {}".format(path))
|
||||||
|
|
||||||
def generate_project(self, extra_context=None):
|
def generate_project(self, extra_context=None):
|
||||||
ctx = {
|
ctx = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user