Commit 98928661 authored by David Foucher's avatar David Foucher

Fix test and add complete the README

parent 4dd44822
Pipeline #1507 passed with stage
in 1 minute and 28 seconds
......@@ -16,7 +16,7 @@
## Install
- Create a venv
- Create a venv : `python3 -m venv trefle`
- Then: `make develop`
## Run a simulation
......@@ -36,6 +36,8 @@
## Run the dev server
trefle serve
and go to url : http://127.0.0.1:3579/explorer/index.html
## Run unittests
......
......@@ -156,7 +156,7 @@ def test_insee_commune_to_departement(input, expected):
"input,expected",
[
((1999, 5, 20), 20),
((1998, 10, 8), 20),
((1999, 10, 8), 20),
((1998, 1, 1), 21),
((1998, 12, 31), 20),
],
......@@ -167,6 +167,7 @@ def test_calculate_age(input, expected, monkeypatch):
def today(cls):
return datetime.datetime(2018, 10, 8)
#TO FIX patch does not work
monkeypatch.setattr(datetime, "date", mydate)
assert calculate_age(datetime.datetime(*input)) == expected
......
Markdown is supported
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