mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 11:04:04 +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
|
||||
flake8==2.5.0
|
||||
sh
|
||||
binaryornot==0.4.0
|
||||
|
||||
# Debugging
|
||||
# -------------------------------------
|
||||
|
|
|
@ -4,6 +4,7 @@ import shutil
|
|||
import unittest
|
||||
from os.path import exists, dirname, join
|
||||
|
||||
from binaryornot.check import is_binary
|
||||
import sh
|
||||
|
||||
from cookiecutter.main import cookiecutter
|
||||
|
@ -26,11 +27,12 @@ class DjangoCookieTestCase(unittest.TestCase):
|
|||
|
||||
# Assert that no match is found in any of the files
|
||||
for path in paths:
|
||||
for line in open(path, 'r'):
|
||||
match = re_obj.search(line)
|
||||
self.assertIsNone(
|
||||
match,
|
||||
"cookiecutter variable not replaced in {}".format(path))
|
||||
if not is_binary(path):
|
||||
for line in open(path, 'r'):
|
||||
match = re_obj.search(line)
|
||||
self.assertIsNone(
|
||||
match,
|
||||
"cookiecutter variable not replaced in {}".format(path))
|
||||
|
||||
def generate_project(self, extra_context=None):
|
||||
ctx = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user