mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-13 19:56:25 +00:00
Coverage for templates
This commit is contained in:
3
.coveragerc
Normal file
3
.coveragerc
Normal file
@@ -0,0 +1,3 @@
|
||||
[run]
|
||||
plugins =
|
||||
django_coverage_plugin
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user