From 29ecf1c651457d146a378dfae7d4c49ce9e576f3 Mon Sep 17 00:00:00 2001 From: Quentin Durand Date: Tue, 17 Jul 2018 17:59:32 +0200 Subject: [PATCH] fix unittest --- install/install.py | 6 +----- src/alert_manager/templates/alert_manager/alerts.html | 2 +- src/pyros/settings.py | 2 +- src/user_manager/forms.py | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/install/install.py b/install/install.py index f46aeb3..c245f5b 100644 --- a/install/install.py +++ b/install/install.py @@ -48,18 +48,14 @@ def install_dependency_ubuntu(command, mode): def install_required_ubuntu(): - install_dependency_ubuntu("ppa:fkrull/deadsnakes", 'a') install_dependency_ubuntu("update", 'u') - install_dependency_ubuntu("python-pip", 'i') install_dependency_ubuntu("python-lxml", 'i') install_dependency_ubuntu("libxml2-dev", 'i') install_dependency_ubuntu("libxslt-dev", 'i') install_dependency_ubuntu("zlib1g-dev", 'i') install_dependency_ubuntu("update", 'u') install_dependency_ubuntu("rabbitmq-server", 'i') - install_dependency_ubuntu("mysql-server", 'i') - install_dependency_ubuntu("mysql-client", 'i') - install_dependency_ubuntu("libmysqlclient-dev", 'i') + #install_dependency_ubuntu("libmysqlclient-dev", 'i') def install_dependency_centos(command, mode): diff --git a/src/alert_manager/templates/alert_manager/alerts.html b/src/alert_manager/templates/alert_manager/alerts.html index 4cc015e..bdc36d9 100644 --- a/src/alert_manager/templates/alert_manager/alerts.html +++ b/src/alert_manager/templates/alert_manager/alerts.html @@ -1,4 +1,4 @@ - {% extends base_template %} + {% extends "base.html" %} {% block title %} Alerts diff --git a/src/pyros/settings.py b/src/pyros/settings.py index 07d1ade..8595d08 100644 --- a/src/pyros/settings.py +++ b/src/pyros/settings.py @@ -100,7 +100,7 @@ ROOT_URLCONF = 'pyros.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ['misc/templates'], + 'DIRS': [os.path.join(BASE_DIR, 'misc/templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/src/user_manager/forms.py b/src/user_manager/forms.py index db4a8bb..25f442c 100644 --- a/src/user_manager/forms.py +++ b/src/user_manager/forms.py @@ -54,7 +54,7 @@ class PyrosUserCreationForm(forms.ModelForm): Creates a User and a PyrosUser in DB ''' pyros_user = PyrosUser.objects.create(username=self.cleaned_data['email'], email=self.cleaned_data['email'], country=Country.objects.all()[0], - user_level=UserLevel.objects.all()[1], + user_level=UserLevel.objects.all()[0], tel=self.cleaned_data['tel'], laboratory=self.cleaned_data['laboratory'], address=self.cleaned_data['address']) pyros_user.set_password(self.cleaned_data['password']) -- libgit2 0.21.2