tests: run in English instead of French (#40575)

This commit is contained in:
Valentin Deniaud 2020-03-10 11:02:20 +01:00
parent 7731e183fd
commit 4374233c6d
3 changed files with 6851 additions and 6850 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
BIJOE_CACHE = False
BIJOE_INIT_SQL = [
'SET lc_time = \'fr_FR.UTF-8\'',
'SET lc_time = \'en_US.UTF-8\'',
]
PAGE_LENGTH = 0
LANGUAGE_CODE = 'en'

View File

@ -35,7 +35,7 @@ def test_simple(schema1, app, admin):
response = form.submit('visualize')
assert 'big-msg-info' not in response
assert get_table(response) == [
['mois (Date)', 'janvier', u'f\xe9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', u'ao\xfbt'],
['mois (Date)', 'january', u'february', 'march', 'april', 'may', 'june', 'july', u'august'],
['number of rows', '10', '1', '1', '1', '1', '1', '1', '1'],
]
@ -54,14 +54,14 @@ def test_truncated_previous_year_range(schema1, app, admin, freezer):
freezer.move_to('2019-01-01 01:00:00')
response = form.submit('visualize')
assert get_table(response) == [
['', 'janvier', u'f\xe9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', u'ao\xfbt', 'Total'],
['', 'january', u'february', 'march', 'april', 'may', 'june', 'july', u'august', 'Total'],
['2017', '0', '0', '0', '0', '0', '0', '0', '0', '0'],
]
freezer.move_to('2018-01-01 01:00:00')
response = form.submit('visualize')
assert get_table(response) == [
['', 'janvier', u'f\xe9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', u'ao\xfbt', 'Total'],
['', 'january', u'february', 'march', 'april', 'may', 'june', 'july', u'august', 'Total'],
['2017', '10', '1', '1', '1', '1', '1', '1', '1', '17'],
]
@ -76,10 +76,10 @@ def test_boolean_dimension(schema1, app, admin):
form.set('measure', 'simple_count')
form.set('drilldown_x', 'boolean')
response = form.submit('visualize')
assert get_table(response) == [['Boolean', 'Oui', 'Non'], ['number of rows', '8', '9']]
form.set('filter__boolean', [o[0] for o in form.fields['filter__boolean'][0].options if o[2] == 'Oui'][0])
assert get_table(response) == [['Boolean', 'Yes', 'No'], ['number of rows', '8', '9']]
form.set('filter__boolean', [o[0] for o in form.fields['filter__boolean'][0].options if o[2] == 'Yes'][0])
response = form.submit('visualize')
assert get_table(response) == [['Boolean', 'Oui', 'Non'], ['number of rows', '8', '0']]
assert get_table(response) == [['Boolean', 'Yes', 'No'], ['number of rows', '8', '0']]
def test_string_dimension(schema1, app, admin):
@ -92,10 +92,10 @@ def test_string_dimension(schema1, app, admin):
form.set('measure', 'simple_count')
form.set('drilldown_x', 'string')
response = form.submit('visualize')
assert get_table(response) == [['String', 'a', 'b', 'c', 'Aucun(e)'], ['number of rows', '11', '2', '3', '1']]
assert get_table(response) == [['String', 'a', 'b', 'c', 'None'], ['number of rows', '11', '2', '3', '1']]
form.set('filter__string', ['a', 'b', '__none__'])
response = form.submit('visualize')
assert get_table(response) == [['String', 'a', 'b', 'c', 'Aucun(e)'], ['number of rows', '11', '2', '0', '1']]
assert get_table(response) == [['String', 'a', 'b', 'c', 'None'], ['number of rows', '11', '2', '0', '1']]
def test_string_dimension_json_data(schema1, app, admin):
@ -111,7 +111,7 @@ def test_string_dimension_json_data(schema1, app, admin):
{u'coords': [{u'value': u'a'}], u'measures': [{u'value': 11}]},
{u'coords': [{u'value': u'b'}], u'measures': [{u'value': 2}]},
{u'coords': [{u'value': u'c'}], u'measures': [{u'value': 3}]},
{u'coords': [{u'value': u'Aucun(e)'}], u'measures': [{u'value': 1}]}
{u'coords': [{u'value': u'None'}], u'measures': [{u'value': 1}]}
]
@ -127,13 +127,13 @@ def test_item_dimension(schema1, app, admin):
response = form.submit('visualize')
assert get_table(response) == [
['Outer SubCategory', u'sub\xe94', u'sub\xe95', u'sub\xe96', u'sub\xe98',
u'sub\xe99', u'sub\xe97', u'sub\xe92', u'sub\xe93', u'sub\xe91', 'Aucun(e)'],
u'sub\xe99', u'sub\xe97', u'sub\xe92', u'sub\xe93', u'sub\xe91', 'None'],
['number of rows', '0', '0', '0', '0', '0', '0', '0', '1', '15', '1']
]
form.set('filter__outersubcategory', ['__none__'])
response = form.submit('visualize')
assert get_table(response) == [
['Outer SubCategory', 'Aucun(e)'],
['Outer SubCategory', 'None'],
['number of rows', '1']
]
@ -196,13 +196,13 @@ def test_truncated_previous_year_range_on_datetime(schema1, app, admin, freezer)
freezer.move_to('2019-01-01 01:00:00')
response = form.submit('visualize')
assert get_table(response) == [
['', 'janvier', u'f\xe9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', u'ao\xfbt', 'Total'],
['', 'january', u'february', 'march', 'april', 'may', 'june', 'july', u'august', 'Total'],
['2017', '0', '0', '0', '0', '0', '0', '0', '0', '0'],
]
freezer.move_to('2018-01-01 01:00:00')
response = form.submit('visualize')
assert get_table(response) == [
['', 'janvier', u'f\xe9vrier', 'mars', 'avril', 'mai', 'juin', 'juillet', u'ao\xfbt', 'Total'],
['', 'january', u'february', 'march', 'april', 'may', 'june', 'july', u'august', 'Total'],
['2017', '10', '1', '1', '1', '1', '1', '1', '1', '17'],
]
@ -240,7 +240,7 @@ def test_none_percent_json_data_2d(schema1, app, admin):
'coords': [{'value': u'2017'}, {'value': u'cat\xe91'}],
'measures': [{'value': 94.11764705882354}]},
{
'coords': [{'value': u'2017'}, {'value': u'Aucun(e)'}],
'coords': [{'value': u'2017'}, {'value': u'None'}],
'measures': [{'value': 5.882352941176471}]
}
]
@ -282,7 +282,7 @@ def test_geoloc(schema1, app, admin):
u'type': u'MultiPoint'
},
u'properties': {
u'Outer Category': u'Aucun(e)',
u'Outer Category': u'None',
u'ann\xe9e (Date)': u'2017'
},
u'type': u'Feature'
@ -294,7 +294,7 @@ def test_geoloc(schema1, app, admin):
},
u'properties': {
u'Outer Category': u'cat\xe92',
u'ann\xe9e (Date)': u'Aucun(e)'
u'ann\xe9e (Date)': u'None'
},
u'type': u'Feature'
},
@ -305,7 +305,7 @@ def test_geoloc(schema1, app, admin):
},
u'properties': {
u'Outer Category': u'cat\xe93',
u'ann\xe9e (Date)': u'Aucun(e)'
u'ann\xe9e (Date)': u'None'
},
u'type': u'Feature'
},
@ -316,7 +316,7 @@ def test_geoloc(schema1, app, admin):
},
u'properties': {
u'Outer Category': u'cat\xe91',
u'ann\xe9e (Date)': u'Aucun(e)'
u'ann\xe9e (Date)': u'None'
},
u'type': u'Feature'
}