Commit ab6a16bb authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

flake8, tests

parent c98e40b8
Pipeline #104 failed with stages
in 12 seconds
variables: variables:
GIT_SSL_NO_VERIFY: "true" GIT_SSL_NO_VERIFY: "true"
dashboard: dashboard-test:
stage: test
image: python:3.6-alpine3.6
before_script:
- cd dashboard
- apk update && apk install add libpq
- pip install -r requirements.txt flake8
script:
- python manage.py test
- flake8
dashboard-deploy:
stage: deploy stage: deploy
image: eur0c.laas.fr:4567/stack-of-tasks/pinocchio-tutorials/deploy image: eur0c.laas.fr:4567/stack-of-tasks/pinocchio-tutorials/deploy
before_script: before_script:
......
from django.contrib import admin from django.contrib.admin import site
# Register your models here. from .models import License, Package, Project, Repo
for model in License, Package, Project, Repo:
site.register(model)
...@@ -3,6 +3,7 @@ from django.utils.safestring import mark_safe ...@@ -3,6 +3,7 @@ from django.utils.safestring import mark_safe
register = template.Library() register = template.Library()
@register.filter @register.filter
def domain(url): def domain(url):
if url: if url:
......
from django.test import TestCase
# Create your tests here.
from django.shortcuts import render
# Create your views here.
...@@ -11,7 +11,7 @@ if __name__ == "__main__": ...@@ -11,7 +11,7 @@ if __name__ == "__main__":
# issue is really that Django is missing to avoid masking other # issue is really that Django is missing to avoid masking other
# exceptions on Python 2. # exceptions on Python 2.
try: try:
import django import django # noqa
except ImportError: except ImportError:
raise ImportError( raise ImportError(
"Couldn't import Django. Are you sure it's installed and " "Couldn't import Django. Are you sure it's installed and "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment