14
14
@pytest .fixture
15
15
def boards ():
16
16
return [ # sorted!
17
- Board .make (
17
+ Board .create (
18
18
** {
19
19
# No start_on; votes don't count
20
20
"voted_on" : date (2023 , 1 , 1 ),
@@ -23,16 +23,17 @@ def boards():
23
23
],
24
24
}
25
25
),
26
- Board .make (
26
+ Board .create (
27
27
** {
28
28
"start_on" : date (2020 , 1 , 1 ),
29
+ "voted_on" : date (2019 , 12 , 1 ),
29
30
"members" : [
30
31
{"name" : "Alice" , "github" : "alice" },
31
32
{"name" : "Doubravka" , "github" : "doubravka" },
32
33
],
33
34
}
34
35
),
35
- Board .make (
36
+ Board .create (
36
37
** {
37
38
"start_on" : date (2019 , 1 , 1 ),
38
39
"voted_on" : date (2018 , 12 , 1 ),
@@ -48,14 +49,18 @@ def assert_boards_sorted(boards):
48
49
assert boards == sorted (boards )
49
50
50
51
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
55
56
date (2018 , 12 , 1 ), # explicit
56
57
]
57
58
58
59
60
+ def assert_started_values (boards ):
61
+ assert [b .start_on for b in boards ] == [False , True , True ]
62
+
63
+
59
64
def test_to_date ():
60
65
assert to_date ("2020-02-12T13:22:01Z" ) == date (2020 , 2 , 12 )
61
66
0 commit comments