Skip to content

Commit c289109

Browse files
committed
add failing test
1 parent fd14074 commit c289109

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# coding: utf-8
2+
'''
3+
translations_labels_mismatch
4+
'''
5+
6+
from ..load_fixture_json import load_fixture_json
7+
8+
DATA = {
9+
'title': 'Your favourite Roman emperors',
10+
'id_string': 'translations_labels_mismatch',
11+
'versions': [
12+
load_fixture_json('translations_labels_mismatch/v1'),
13+
],
14+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "v1",
3+
"content": {
4+
"survey": [
5+
{
6+
"type": "text",
7+
"name": "fav_emperor",
8+
"label": [
9+
"Who is your favourite emperor?"
10+
],
11+
"hint::English (en)": "Before the decline of the Roman Empire"
12+
}
13+
],
14+
"translated": [
15+
"hint",
16+
"label"
17+
],
18+
"translations": [
19+
null
20+
]
21+
},
22+
"submissions": [
23+
{
24+
"fav_emperor": "Marcus Aurelius"
25+
}
26+
]
27+
}

tests/test_exports.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ def test_submissions_of_group_exports(self):
370370
],
371371
)
372372

373+
def test_translations_labels_mismatch(self):
374+
title, schemas, submissions = build_fixture('translations_labels_mismatch')
375+
fp = FormPack(schemas, title)
376+
options = {'versions': 'v1'}
377+
export = fp.export(**options).to_dict(submissions)
378+
373379
def test_simple_nested_grouped_repeatable(self):
374380
title, schemas, submissions = build_fixture(
375381
'simple_nested_grouped_repeatable'

0 commit comments

Comments
 (0)