@@ -56,39 +56,44 @@ def setUpTestData(cls):
56
56
type = 'ban' ,
57
57
reason = 'He terk my jerb!' ,
58
58
hidden = True ,
59
+ inserted_at = dt (2020 , 10 , 10 , 0 , 0 , 0 , tzinfo = timezone .utc ),
59
60
expires_at = dt (5018 , 11 , 20 , 15 , 52 , tzinfo = timezone .utc ),
60
- active = True
61
+ active = True ,
61
62
)
62
63
cls .ban_inactive = Infraction .objects .create (
63
64
user_id = cls .user .id ,
64
65
actor_id = cls .user .id ,
65
66
type = 'ban' ,
66
67
reason = 'James is an ass, and we won\' t be working with him again.' ,
67
- active = False
68
+ active = False ,
69
+ inserted_at = dt (2020 , 10 , 10 , 0 , 1 , 0 , tzinfo = timezone .utc ),
68
70
)
69
71
cls .mute_permanent = Infraction .objects .create (
70
72
user_id = cls .user .id ,
71
73
actor_id = cls .user .id ,
72
74
type = 'mute' ,
73
75
reason = 'He has a filthy mouth and I am his soap.' ,
74
76
active = True ,
75
- expires_at = None
77
+ inserted_at = dt (2020 , 10 , 10 , 0 , 2 , 0 , tzinfo = timezone .utc ),
78
+ expires_at = None ,
76
79
)
77
80
cls .superstar_expires_soon = Infraction .objects .create (
78
81
user_id = cls .user .id ,
79
82
actor_id = cls .user .id ,
80
83
type = 'superstar' ,
81
84
reason = 'This one doesn\' t matter anymore.' ,
82
85
active = True ,
83
- expires_at = dt .now (timezone .utc ) + datetime .timedelta (hours = 5 )
86
+ inserted_at = dt (2020 , 10 , 10 , 0 , 3 , 0 , tzinfo = timezone .utc ),
87
+ expires_at = dt .now (timezone .utc ) + datetime .timedelta (hours = 5 ),
84
88
)
85
89
cls .voiceban_expires_later = Infraction .objects .create (
86
90
user_id = cls .user .id ,
87
91
actor_id = cls .user .id ,
88
92
type = 'voice_ban' ,
89
93
reason = 'Jet engine mic' ,
90
94
active = True ,
91
- expires_at = dt .now (timezone .utc ) + datetime .timedelta (days = 5 )
95
+ inserted_at = dt (2020 , 10 , 10 , 0 , 4 , 0 , tzinfo = timezone .utc ),
96
+ expires_at = dt .now (timezone .utc ) + datetime .timedelta (days = 5 ),
92
97
)
93
98
94
99
def test_list_all (self ):
0 commit comments