aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/test_unfurl.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/_pytest/test_unfurl.py b/_pytest/test_unfurl.py
index 13ba392..4aac742 100644
--- a/_pytest/test_unfurl.py
+++ b/_pytest/test_unfurl.py
@@ -2,6 +2,7 @@ from __future__ import print_function, unicode_literals
from datetime import datetime, timedelta
import pytest
+import time
import wee_slack
@@ -121,17 +122,17 @@ import wee_slack
},
{
'input': "Ends <!date^{}^{{date_pretty}} - {{date_short_pretty}} - {{date_long_pretty}}>.".format(
- int((datetime.today()).timestamp())),
+ int(time.mktime(datetime.today().timetuple()))),
'output': "Ends today - today - today."
},
{
'input': "Ends <!date^{}^{{date_pretty}} - {{date_short_pretty}} - {{date_long_pretty}}>.".format(
- int((datetime.today() - timedelta(days=1)).timestamp())),
+ int(time.mktime((datetime.today() - timedelta(days=1)).timetuple()))),
'output': "Ends yesterday - yesterday - yesterday."
},
{
'input': "Ends <!date^{}^{{date_pretty}} - {{date_short_pretty}} - {{date_long_pretty}}>.".format(
- int((datetime.today() + timedelta(days=1)).timestamp())),
+ int(time.mktime((datetime.today() + timedelta(days=1)).timetuple()))),
'output': "Ends tomorrow - tomorrow - tomorrow."
},
{