mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 20:01:51 +02:00
install flake8 and check files
This commit is contained in:
parent
e522b59ff3
commit
5a5b4ccb25
5 changed files with 10 additions and 8 deletions
|
@ -1,5 +1,3 @@
|
||||||
import datetime
|
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
|
@ -13,7 +13,7 @@ class TestGroupedOrdersModel:
|
||||||
"""
|
"""
|
||||||
deadline = timezone.now() + datetime.timedelta(days=10)
|
deadline = timezone.now() + datetime.timedelta(days=10)
|
||||||
ongoing_gr_order = Grouped_order(deadline=deadline)
|
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):
|
def test_is_ongoing_with_old_grouped_order(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.shortcuts import render, get_object_or_404, get_list_or_404
|
from django.shortcuts import render, get_object_or_404
|
||||||
from django.http import HttpResponse, Http404, HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
|
|
@ -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/).
|
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
|
```bash
|
||||||
pytest
|
pytest
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
DJANGO_SETTINGS_MODULE = la_chariotte.settings
|
DJANGO_SETTINGS_MODULE = la_chariotte.settings
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
exclude = migrations
|
||||||
|
extend-ignore = E501
|
Loading…
Reference in a new issue