Skip to content

Commit

Permalink
Add test for flattening select_one_from_file
Browse files Browse the repository at this point in the history
(test currently failing)
  • Loading branch information
jnm committed Jan 25, 2024
1 parent f3eb041 commit 3c2ca33
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_utils_flatten_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ def test_flatten_select_or_other():
assert row0['type'] == 'select_one xyz or_other'
assert 'select_from_list_name' not in row0

def test_flatten_select_one_from_file():
s1 = {
'survey': [
{'type': 'select_one_from_file', 'file': 'fruits.csv'}
]
}
flatten_content(s1, in_place=True)
row0 = s1['survey'][0]
assert row0['type'] == 'select_one_from_file fruits.csv'
assert 'file' not in row0


def test_flatten_select():
s1 = {'survey': [{'type': 'select_one', 'select_from_list_name': 'aaa'}]}
Expand Down

0 comments on commit 3c2ca33

Please sign in to comment.