Fix test failure due to favicon.ico being opened by DjangoCookieTestCase.check_paths().

This commit is contained in:
Audrey Roy Greenfeld 2015-11-06 19:44:10 -08:00
parent 1c1ca39618
commit 7e8f58d6ec
2 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,7 @@
cookiecutter==1.2.1
flake8==2.5.0
sh
binaryornot==0.4.0
# Debugging
# -------------------------------------

View File

@ -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,6 +27,7 @@ class DjangoCookieTestCase(unittest.TestCase):
# Assert that no match is found in any of the files
for path in paths:
if not is_binary(path):
for line in open(path, 'r'):
match = re_obj.search(line)
self.assertIsNone(