From 9ed969eea175176aa2fce9b89c8a9ee465f3333c Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 24 Oct 2016 14:00:43 -0500 Subject: [PATCH] Fix Mock localtime to return same val in Linux & Windows --- gramps/plugins/test/test_imports.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/test/test_imports.py b/gramps/plugins/test/test_imports.py index 65ceb4038..9b46c37dc 100644 --- a/gramps/plugins/test/test_imports.py +++ b/gramps/plugins/test/test_imports.py @@ -25,7 +25,7 @@ import unittest import os import sys import re -from time import localtime +from time import localtime, strptime from unittest.mock import patch #import logging @@ -57,7 +57,7 @@ def mock_localtime(*args): """ Mock up a dummy to replace the varying 'time string results' """ - return localtime(946101600.) + return strptime("25 Dec 1999", "%d %b %Y") class CompleteCheck(unittest.TestCase): """The test class cases will be dynamically created at import time from