Skip to content

Commit

Permalink
Merge pull request #432 from lognaturel/fix-tests
Browse files Browse the repository at this point in the history
Fix syntax errors causing tests to fail Validate check
  • Loading branch information
yanokwa authored Feb 17, 2020
2 parents 5eddece + f821dbb commit c079d24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyxform/tests_v1/test_dynamic_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ def test_dynamic_default_with_nested_expression(self):
md="""
| survey | | | | |
| | type | name | label | default |
| | integer | patient_count | Patient count | if(${last-saved#patient_count} == '', 0, ${last-saved#patient_count} + 1) |
| | integer | patient_count | Patient count | if(${last-saved#patient_count} = '', 0, ${last-saved#patient_count} + 1) |
""",
xml__contains=[
'<instance id="__last-saved" src="jr://instance/last-saved"/>',
'<setvalue event="odk-instance-first-load" ref="/dynamic/patient_count" '
"value=\"if( instance('__last-saved')/dynamic/patient_count == '', 0, "
"value=\"if( instance('__last-saved')/dynamic/patient_count = '', 0, "
"instance('__last-saved')/dynamic/patient_count + 1)\"/>",
],
)
Expand Down
4 changes: 2 additions & 2 deletions pyxform/tests_v1/test_last_saved.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_last_saved_in_choice_filter_does_not_use_current_or_relative_ref(self):
| | type | name | label | choice_filter |
| | begin repeat | repeat | | |
| | select_one foo | foo | Foo | not(selected(${last-saved#foo}, name)) |
| | select_one foo | bar | Bar | not(selected(${foo}, name) |
| | select_one foo | bar | Bar | not(selected(${foo}, name)) |
| | end repeat | repeat | | |
| choices| | | | |
| | list_name | name | label | |
Expand All @@ -175,7 +175,7 @@ def test_last_saved_in_choice_filter_does_not_use_current_or_relative_ref(self):
xml__contains=[
'<instance id="__last-saved" src="jr://instance/last-saved"/>',
"<itemset nodeset=\"instance('foo')/root/item[not(selected( instance('__last-saved')/last-saved/repeat/foo , name))]\">",
"<itemset nodeset=\"instance('foo')/root/item[not(selected( current()/../foo , name)]\">",
"<itemset nodeset=\"instance('foo')/root/item[not(selected( current()/../foo , name))]\">",
],
)

Expand Down

0 comments on commit c079d24

Please sign in to comment.