File tree 2 files changed +3
-1
lines changed
tests/sentry/integrations/slack
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ def _get_all_from_buffer(self):
38
38
i = 0
39
39
buffer_key = f"{ self .integrationkey } :{ now .strftime ('%Y-%m-%d' )} "
40
40
while self .client .hgetall (buffer_key ):
41
+ ret .append (self .client .hgetall (buffer_key ))
41
42
cur = (now - timedelta (days = i )).strftime ("%Y-%m-%d" )
42
43
buffer_key = f"{ self .integrationkey } :{ cur } "
43
- ret .append (self .client .hgetall (buffer_key ))
44
44
i += 1
45
45
46
46
return ret
Original file line number Diff line number Diff line change
1
+ import time
1
2
from datetime import datetime , timedelta
2
3
3
4
import pytest
@@ -204,4 +205,5 @@ def test_expiry(self):
204
205
buffer .record_error ()
205
206
with pytest .raises (ApiError ):
206
207
client .post ("/chat.postMessage" , data = self .payload )
208
+ time .sleep (1 )
207
209
assert len (buffer ._get_all_from_buffer ()) == 30
You can’t perform that action at this time.
0 commit comments