Skip to content

Commit

Permalink
Upgrade pyxform version to 0.15.1
Browse files Browse the repository at this point in the history
- Fix failing tests related to the change in /meta/instanceID binding
  More info: XLSForm/pyxform#94
- Fix failing test related to a change in the PyXform error raised
  when an invalid XML tag is found. More info: XLSForm/pyxform#22
- Fix failing tests related to the 'allow_duplicate_choice' setting
  not being present. More info: XLSForm/pyxform#23
  • Loading branch information
DavisRayM committed Jan 28, 2020
1 parent f19c8d4 commit b3568c7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<bind nodeset="/transportation/transport/loop_over_transport_types_frequency/motorbike/frequency_to_referral_facility" relevant="selected( /transportation/transport/available_transportation_types_to_referral_facility , 'motorbike')" type="select1"/>
<bind nodeset="/transportation/transport/loop_over_transport_types_frequency/taxi/frequency_to_referral_facility" relevant="selected( /transportation/transport/available_transportation_types_to_referral_facility , 'taxi')" type="select1"/>
<bind nodeset="/transportation/image1" type="binary"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/transportation/meta/instanceID" readonly="true()" type="string"/>
<bind jr:preload="uid" nodeset="/transportation/meta/instanceID" readonly="true()" type="string"/>
<bind calculate="''" nodeset="/transportation/formhub/uuid" type="string"/>
</model>
</h:head>
Expand Down
7 changes: 4 additions & 3 deletions onadata/apps/main/tests/test_form_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ def test_spaced_xlsform(self):
self.xform.save()
xls_path = os.path.join(self.this_directory, "fixtures",
"transportation", "tutorial .xls")
msg = u"The name 'tutorial ' is an invalid xml tag. Names must begin"\
u" with a letter, colon, or underscore, subsequent characters "\
u"can include numbers, dashes, and periods"
msg = ("The name 'tutorial ' is an invalid XML tag, it contains an"
" invalid character ' '. Names must begin with a letter, colon,"
" or underscore, subsequent characters can include numbers, "
"dashes, and periods")
self.assertRaisesMessage(
PyXFormError, msg, self._publish_xls_file, xls_path)
self.assertEquals(XForm.objects.count(), count)
2 changes: 1 addition & 1 deletion onadata/apps/main/tests/test_past_bugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TestCascading(TestBase):

def test_correct_id_string_picked(self):
XForm.objects.all().delete()
name = 'new_cascading_select.xls'
name = 'new_cascading_select.xlsx'
id_string = u'cascading_select_test'
self._publish_xls_file(os.path.join(
self.this_directory, 'fixtures', 'bug_fixes', name))
Expand Down
2 changes: 1 addition & 1 deletion onadata/apps/main/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def test_uuid_injection_in_cascading_select(self):
pre_count = XForm.objects.count()
xls_path = os.path.join(
self.this_directory, "fixtures", "cascading_selects",
"new_cascading_select.xls")
"new_cascading_select.xlsx")
file_name, file_ext = os.path.splitext(os.path.split(xls_path)[1])
TestBase._publish_xls_file(self, xls_path)
post_count = XForm.objects.count()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_get_merged_xform_survey(self):
u'name': u'instanceID',
u'bind': {
u'readonly': u'true()',
u'calculate': u"concat('uuid:', uuid())"
u'jr:preload': u"uid"
},
u'type': u'calculate'
}],
Expand Down Expand Up @@ -314,7 +314,7 @@ def test_group_merged_xform_survey(self):
u'name': u'instanceID',
u'bind': {
u'readonly': u'true()',
u'calculate': u"concat('uuid:', uuid())"
u'jr:preload': u"uid"
},
u'type': u'calculate'
}],
Expand Down Expand Up @@ -391,7 +391,7 @@ def test_repeat_merged_xform_survey(self):
u'name': u'instanceID',
u'bind': {
u'readonly': u'true()',
u'calculate': u"concat('uuid:', uuid())"
u'jr:preload': u'uid'
},
u'type': u'calculate'
}],
Expand Down Expand Up @@ -431,7 +431,7 @@ def test_matching_fields_by_type(self):
u'name': u'instanceID',
u'bind': {
u'readonly': u'true()',
u'calculate': u"concat('uuid:', uuid())"
u'jr:preload': u'uid'
},
u'type': u'calculate'
}],
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.pip
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pyrsistent==0.15.1 # via jsonschema
python-dateutil==2.8.0 # via fleming, tableschema
python-memcached==1.59
pytz==2019.1 # via babel, celery, django, django-query-builder, fleming
pyxform==0.13.1
pyxform==0.15.1
raven==6.10.0
recaptcha-client==1.0.6
requests-mock==1.6.0
Expand Down

0 comments on commit b3568c7

Please sign in to comment.