1414@pytest .fixture
1515def boards ():
1616 return [ # sorted!
17- Board .make (
17+ Board .create (
1818 ** {
1919 # No start_on; votes don't count
2020 "voted_on" : date (2023 , 1 , 1 ),
@@ -23,16 +23,17 @@ def boards():
2323 ],
2424 }
2525 ),
26- Board .make (
26+ Board .create (
2727 ** {
2828 "start_on" : date (2020 , 1 , 1 ),
29+ "voted_on" : date (2019 , 12 , 1 ),
2930 "members" : [
3031 {"name" : "Alice" , "github" : "alice" },
3132 {"name" : "Doubravka" , "github" : "doubravka" },
3233 ],
3334 }
3435 ),
35- Board .make (
36+ Board .create (
3637 ** {
3738 "start_on" : date (2019 , 1 , 1 ),
3839 "voted_on" : date (2018 , 12 , 1 ),
@@ -48,14 +49,18 @@ def assert_boards_sorted(boards):
4849 assert boards == sorted (boards )
4950
5051
51- def assert_voted_on_defaults (boards ):
52- assert [b .voted_on for b in boards ] == [
53- date (2023 , 1 , 1 ), # explicit
54- date (2020 , 1 , 1 ), # from start_on
52+ def assert_start_on_defaults (boards ):
53+ assert [b .start_on for b in boards ] == [
54+ date (2023 , 1 , 1 ), # from voted_on
55+ date (2020 , 1 , 1 ), # explicit
5556 date (2018 , 12 , 1 ), # explicit
5657 ]
5758
5859
60+ def assert_started_values (boards ):
61+ assert [b .start_on for b in boards ] == [False , True , True ]
62+
63+
5964def test_to_date ():
6065 assert to_date ("2020-02-12T13:22:01Z" ) == date (2020 , 2 , 12 )
6166
0 commit comments