install flake8 and check files

This commit is contained in:
Laetitia Getti 2023-03-30 14:51:09 +02:00
parent e522b59ff3
commit 5a5b4ccb25
5 changed files with 10 additions and 8 deletions

View file

@ -1,5 +1,3 @@
import datetime
from django.db import models
from django.utils import timezone

View file

@ -13,7 +13,7 @@ class TestGroupedOrdersModel:
"""
deadline = timezone.now() + datetime.timedelta(days=10)
ongoing_gr_order = Grouped_order(deadline=deadline)
assert ongoing_gr_order.is_ongoing() == True
assert ongoing_gr_order.is_ongoing()
def test_is_ongoing_with_old_grouped_order(self):
"""

View file

@ -1,5 +1,5 @@
from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils import timezone
from django.views import generic

View file

@ -2,9 +2,9 @@
La Chariotte est une application web sous licence libre Affera GPL, développée et maintenue par [Hashbang](https://hashbang.fr/).
## Lancer les tests
## Lancer les tests et linter
Avec pytest,
Lancer les tests avec pytest :
```bash
pytest

View file

@ -1,2 +1,6 @@
[tool:pytest]
DJANGO_SETTINGS_MODULE = la_chariotte.settings
[flake8]
exclude = migrations
extend-ignore = E501