Skip to content

Commit

Permalink
Upgrade pyxform version to 1.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
  • Loading branch information
DavisRayM committed Jan 28, 2020
1 parent f19c8d4 commit 4b9d73b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
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)
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 4b9d73b

Please sign in to comment.