-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from kobotoolbox/issue-159
Columns in exports are out of sequence - fix
- Loading branch information
Showing
9 changed files
with
291 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,5 @@ env.source | |
|
||
# config file | ||
*sublime-* | ||
.vscode/ | ||
.vscode/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/fixtures/field_position_with_multiple_versions/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# coding: utf-8 | ||
|
||
from __future__ import (unicode_literals, print_function, | ||
absolute_import, division) | ||
|
||
''' | ||
field_position_with_multiple_versions: | ||
* v1: `Fullname` and `Age` in repeating group | ||
* v2: Add `City` after repeating group | ||
* v3: Replace `Fullname` with `Firstname`, `Lastname`, and `Gender` | ||
''' | ||
|
||
from ..load_fixture_json import load_fixture_json | ||
|
||
DATA = { | ||
u'title': 'Field Position with Multiple Versions', | ||
u'id_string': 'field_position_with_multiple_versions', | ||
u'versions': [ | ||
load_fixture_json('field_position_with_multiple_versions/v1'), | ||
load_fixture_json('field_position_with_multiple_versions/v2'), | ||
load_fixture_json('field_position_with_multiple_versions/v3'), | ||
], | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/fixtures/field_position_with_multiple_versions/v1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": "fpmv_1", | ||
"content": { | ||
"translated": [ | ||
"label" | ||
], | ||
"survey": [ | ||
{ | ||
"type": "begin_repeat", | ||
"name": "group_wy15q80", | ||
"label": [ | ||
"Person" | ||
] | ||
}, | ||
{ | ||
"name": "Fullname", | ||
"required": false, | ||
"type": "text", | ||
"label": [ | ||
"Fullname" | ||
] | ||
}, | ||
{ | ||
"name": "Age", | ||
"required": false, | ||
"type": "date", | ||
"label": [ | ||
"Age" | ||
] | ||
}, | ||
{ | ||
"type": "end_repeat" | ||
} | ||
] | ||
}, | ||
"submissions": [] | ||
} |
45 changes: 45 additions & 0 deletions
45
tests/fixtures/field_position_with_multiple_versions/v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"version": "fpmv_2", | ||
"content": { | ||
"translated": [ | ||
"label" | ||
], | ||
"survey": [ | ||
{ | ||
"type": "begin_repeat", | ||
"name": "group_wy15q80", | ||
"label": [ | ||
"Person" | ||
] | ||
}, | ||
{ | ||
"name": "Fullname", | ||
"required": false, | ||
"type": "text", | ||
"label": [ | ||
"Fullname" | ||
] | ||
}, | ||
{ | ||
"name": "Age", | ||
"required": false, | ||
"type": "date", | ||
"label": [ | ||
"Age" | ||
] | ||
}, | ||
{ | ||
"type": "end_repeat" | ||
}, | ||
{ | ||
"name": "City", | ||
"required": false, | ||
"type": "text", | ||
"label": [ | ||
"City" | ||
] | ||
} | ||
] | ||
}, | ||
"submissions": [] | ||
} |
82 changes: 82 additions & 0 deletions
82
tests/fixtures/field_position_with_multiple_versions/v3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"version": "fpmv_3", | ||
"content": { | ||
"choices": [ | ||
{ | ||
"list_name": "kd0ep51", | ||
"name": "male", | ||
"label": [ | ||
"Male" | ||
] | ||
}, | ||
{ | ||
"list_name": "kd0ep51", | ||
"name": "female", | ||
"label": [ | ||
"Female" | ||
] | ||
}, | ||
{ | ||
"list_name": "kd0ep51", | ||
"name": "other", | ||
"label": [ | ||
"Other" | ||
] | ||
} | ||
], | ||
"survey": [ | ||
{ | ||
"type": "begin_repeat", | ||
"name": "group_wy15q80", | ||
"label": [ | ||
"Person" | ||
] | ||
}, | ||
{ | ||
"name": "Firstname", | ||
"required": false, | ||
"type": "text", | ||
"label": [ | ||
"Firstname" | ||
] | ||
}, | ||
{ | ||
"name": "Lastname", | ||
"required": false, | ||
"type": "text", | ||
"label": [ | ||
"Lastname" | ||
] | ||
}, | ||
{ | ||
"select_from_list_name": "kd0ep51", | ||
"name": "Gender", | ||
"required": false, | ||
"label": [ | ||
"Gender" | ||
], | ||
"type": "select_one" | ||
}, | ||
{ | ||
"name": "Age", | ||
"required": false, | ||
"type": "date", | ||
"label": [ | ||
"Age" | ||
] | ||
}, | ||
{ | ||
"type": "end_repeat" | ||
}, | ||
{ | ||
"name": "City", | ||
"required": false, | ||
"type": "text", | ||
"label": [ | ||
"City" | ||
] | ||
} | ||
] | ||
}, | ||
"submissions": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.