10039: Fix imports test for non-US locales
This commit is contained in:
parent
cf479647ad
commit
804fa635e6
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user