10039: Fix imports test for non-US locales

This commit is contained in:
Nick Hall 2017-05-11 19:33:45 +01:00
parent cf479647ad
commit 804fa635e6

View File

@ -25,6 +25,7 @@ import unittest
import os import os
import sys import sys
import re import re
import locale
from time import localtime, strptime from time import localtime, strptime
from unittest.mock import patch from unittest.mock import patch
#import logging #import logging
@ -49,6 +50,9 @@ TEST_DIR = os.path.abspath(os.path.join(DATA_DIR, "tests"))
# Local Functions # Local Functions
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# These tests assume a US date and time format.
locale.setlocale(locale.LC_ALL, 'en_US.utf8')
def mock_time(*args): def mock_time(*args):
""" """
Mock up a dummy to replace the varying 'time string results' Mock up a dummy to replace the varying 'time string results'