Coverage for templates

This commit is contained in:
Oliver Falk
2018-05-23 11:58:50 +02:00
parent 163299bb26
commit b2256090ca
4 changed files with 13 additions and 2 deletions

3
.coveragerc Normal file
View File

@@ -0,0 +1,3 @@
[run]
plugins =
django_coverage_plugin

View File

@@ -10,6 +10,7 @@ before_script:
- pip install python-coveralls
- pip install coverage
- pip install pycco
- pip install django_coverage_plugin
test_and_coverage:
stage: test

View File

@@ -1,3 +1,10 @@
'''
Local config
'''
from ivatar.settings import TEMPLATES # noqa
SESSION_COOKIE_SECURE = False
DEBUG = True
SITE_URL = 'http://localhost:8383'
TEMPLATES[0]['OPTIONS']['debug'] = True

View File

@@ -84,7 +84,7 @@ class Photo(BaseAccountModel):
image_url = gravatar['image_url']
if not image_url:
return False
return False # pragma: no cover
try:
image = urlopen(image_url)
# No idea how to test this