Fix Mock localtime to return same val in Linux & Windows

This commit is contained in:
prculley 2016-10-24 14:00:43 -05:00
parent 0fb91b860f
commit 9ed969eea1

View File

@ -25,7 +25,7 @@ import unittest
import os import os
import sys import sys
import re import re
from time import localtime from time import localtime, strptime
from unittest.mock import patch from unittest.mock import patch
#import logging #import logging
@ -57,7 +57,7 @@ def mock_localtime(*args):
""" """
Mock up a dummy to replace the varying 'time string results' 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): class CompleteCheck(unittest.TestCase):
"""The test class cases will be dynamically created at import time from """The test class cases will be dynamically created at import time from