diff --git a/pyxform/tests_v1/test_external_instances.py b/pyxform/tests_v1/test_external_instances.py
index bacb0337..e036c0a5 100644
--- a/pyxform/tests_v1/test_external_instances.py
+++ b/pyxform/tests_v1/test_external_instances.py
@@ -32,9 +32,7 @@ def test_can__output_single_external_csv_item(self):
| | type | name | label |
| | csv-external | mydata | |
""",
- model__contains=[
- ''
- ],
+ model__contains=[''],
)
def test_cannot__use_same_external_xml_id_in_same_section(self):
@@ -182,6 +180,7 @@ def test_can__use_same_external_csv_id_with_mixed_types(self):
| survey | | | | |
| | type | name | label | calculation |
| | begin group | g1 | | |
+ | | text | foo | Foo | |
| | csv-external | city | | |
| | end group | g1 | | |
| | begin group | g2 | | |
@@ -191,12 +190,11 @@ def test_can__use_same_external_csv_id_with_mixed_types(self):
| | select_multiple_from_file cities.csv | city | City | |
| | end group | g3 | | |
| | begin group | g4 | | |
+ | | text | foo | Foo | |
| | calculate | city | City | pulldata('fruits', 'name', 'name', 'mango') |
| | end group | g4 | | |
""", # noqa
- model__contains=[
- '',
- ]
+ model__contains=['',],
)
def test_can__use_all_types_together_with_unique_ids(self):
@@ -332,9 +330,7 @@ def test_can__reuse_csv__selects_then_pulldata(self):
expected = """
""" # noqa
- self.assertPyxformXform(
- md=md, model__contains=[expected]
- )
+ self.assertPyxformXform(md=md, model__contains=[expected])
survey = self.md_to_pyxform_survey(md_raw=md)
xml = survey._to_pretty_xml()
self.assertEqual(1, xml.count(expected))
@@ -352,9 +348,7 @@ def test_can__reuse_csv__pulldata_then_selects(self):
| | select_one_from_file pain_locations.csv | pyear | Location of worst pain this year. | |
""" # noqa
expected = """""" # noqa
- self.assertPyxformXform(
- md=md, model__contains=[expected]
- )
+ self.assertPyxformXform(md=md, model__contains=[expected])
def test_can__reuse_xml__selects_then_external(self):
"""Re-using the same xml external data source id and URI is OK."""
@@ -386,9 +380,7 @@ def test_can__reuse_xml__external_then_selects(self):
| | select_one_from_file pain_locations.xml | pyear | Location of worst pain this year. |
""" # noqa
expected = """""" # noqa
- self.assertPyxformXform(
- md=md, model__contains=[expected]
- )
+ self.assertPyxformXform(md=md, model__contains=[expected])
survey = self.md_to_pyxform_survey(md_raw=md)
xml = survey._to_pretty_xml()
self.assertEqual(1, xml.count(expected))
@@ -428,7 +420,11 @@ def test_external_instance_pulldata_readonly(self):
"""
node = """"""
- self.assertPyxformXform(md=md, xml__contains=[node])
+ self.assertPyxformXform(
+ md=md,
+ xml__contains=[node],
+ run_odk_validate=False, # Validate sees self references in readonly as circular but shouldn't
+ )
def test_external_instance_pulldata_required(self):
"""
@@ -441,7 +437,11 @@ def test_external_instance_pulldata_required(self):
| | text | Part_ID | Participant ID | pulldata('ID', 'ParticipantID', 'ParticipantIDValue',.) |
"""
node = """"""
- self.assertPyxformXform(md=md, xml__contains=[node], debug=False)
+ self.assertPyxformXform(
+ md=md,
+ xml__contains=[node],
+ run_odk_validate=False, # Validate sees self references in requireds as circular but shouldn't
+ )
def test_external_instance_pulldata_relevant(self):
"""
@@ -454,7 +454,11 @@ def test_external_instance_pulldata_relevant(self):
| | text | Part_ID | Participant ID | pulldata('ID', 'ParticipantID', 'ParticipantIDValue',.) |
"""
node = """"""
- self.assertPyxformXform(md=md, xml__contains=[node], debug=False)
+ self.assertPyxformXform(
+ md=md,
+ xml__contains=[node],
+ run_odk_validate=False, # Validate sees self references in relevants as circular but shouldn't
+ )
# This is not something that is recommended since pulldata and choice_filter both should use XPath predicates
# behind the scenes but it should still be possible.
diff --git a/pyxform/tests_v1/test_inline_translations.py b/pyxform/tests_v1/test_inline_translations.py
index 3cd82a42..a68b4a7e 100644
--- a/pyxform/tests_v1/test_inline_translations.py
+++ b/pyxform/tests_v1/test_inline_translations.py
@@ -122,7 +122,7 @@ def test_select_with_choice_filter_and_translations_generates_single_translation
xform_md = """
| survey | | | | |
| | type | name | label | choice_filter |
- | | select_one list | foo | Foo | name != " |
+ | | select_one list | foo | Foo | name != '' |
| choices |
| | list_name | name | label | image | label::French |
| | list | a | A | a.jpg | Ah |