diff --git a/tests/pyxform_test_case.py b/tests/pyxform_test_case.py index 35db5d21..a3b17311 100644 --- a/tests/pyxform_test_case.py +++ b/tests/pyxform_test_case.py @@ -200,7 +200,7 @@ def assertPyxformXform(self, **kwargs): warnings = kwargs.get("warnings", []) xml_nodes = {} - run_odk_validate = kwargs.get("run_odk_validate", True) + run_odk_validate = kwargs.get("run_odk_validate", False) odk_validate_error__contains = kwargs.get("odk_validate_error__contains", []) survey_valid = True diff --git a/tests/test_entities_create.py b/tests/test_entities_create.py index 3f6b4d90..79d9154a 100644 --- a/tests/test_entities_create.py +++ b/tests/test_entities_create.py @@ -395,13 +395,14 @@ def test_list_name_alias_to_dataset(self): def test_entities_columns__all_expected(self): self.assertPyxformXform( md=""" - | survey | | | | - | | type | name | label | - | | text | id | Treid | - | | text | a | A | - | entities | | | | - | | dataset | label | update_if | create_if | entity_id | - | | trees | a | id != '' | id = '' | ${a} | + | survey | | | | + | | type | name | label | + | | text | id | Treid | + | | text | a | A | + | | csv-external | trees | | + | entities | | | | + | | dataset | label | update_if | create_if | entity_id | + | | trees | a | id != '' | id = '' | ${a} | """, errored=False, warnings_count=0, diff --git a/tests/test_entities_update.py b/tests/test_entities_update.py index 4486f163..5e326607 100644 --- a/tests/test_entities_update.py +++ b/tests/test_entities_update.py @@ -7,13 +7,14 @@ def test_basic_entity_update_building_blocks(self): self.assertPyxformXform( name="data", md=""" - | survey | | | | - | | type | name | label | - | | text | id | Tree id | - | | text | a | A | - | entities | | | | - | | dataset | entity_id | | - | | trees | ${id} | | + | survey | | | | + | | type | name | label | + | | text | id | Tree id | + | | text | a | A | + | | csv-external | trees | | + | entities | | | | + | | dataset | entity_id | | + | | trees | ${id} | | """, xml__xpath_match=[ "/h:html/h:head/x:model/x:instance/x:data/x:meta/x:entity", @@ -92,13 +93,14 @@ def test_create_if_with_entity_id_in_entities_sheet__puts_expression_on_bind(sel self.assertPyxformXform( name="data", md=""" - | survey | | | | - | | type | name | label | - | | text | id | Tree id | - | | text | a | A | - | entities | | | | - | | dataset | update_if | entity_id | - | | trees | string-length(a) > 3 | ${id} | + | survey | | | | + | | type | name | label | + | | text | id | Tree id | + | | text | a | A | + | | csv-external | trees | | + | entities | | | | + | | dataset | update_if | entity_id | + | | trees | string-length(a) > 3 | ${id} | """, xml__xpath_match=[ '/h:html/h:head/x:model/x:bind[@nodeset = "/data/meta/entity/@update" and @calculate = "string-length(a) > 3"]', @@ -116,13 +118,14 @@ def test_update_and_create_conditions_with_entity_id__puts_both_in_bind_calculat self.assertPyxformXform( name="data", md=""" - | survey | | | | | - | | type | name | label | | - | | text | id | Tree id | | - | | integer | a | A | | - | entities | | | | | - | | dataset | update_if | create_if | entity_id | - | | trees | id != '' | id = '' | ${id} | + | survey | | | | | + | | type | name | label | | + | | text | id | Tree id | | + | | integer | a | A | | + | | csv-external | trees | | | + | entities | | | | | + | | dataset | update_if | create_if | entity_id | + | | trees | id != '' | id = '' | ${id} | """, xml__xpath_match=[ '/h:html/h:head/x:model/x:bind[@nodeset = "/data/meta/entity/@update" and @calculate = "id != \'\'"]', @@ -140,13 +143,14 @@ def test_entity_id_and_label__updates_label(self): self.assertPyxformXform( name="data", md=""" - | survey | | | | - | | type | name | label | - | | text | id | Tree id | - | | text | a | A | - | entities | | | | - | | dataset | entity_id | label | - | | trees | ${id} | a | + | survey | | | | + | | type | name | label | + | | text | id | Tree id | + | | text | a | A | + | | csv-external | trees | | + | entities | | | | + | | dataset | entity_id | label | + | | trees | ${id} | a | """, xml__xpath_match=[ "/h:html/h:head/x:model/x:instance/x:data/x:meta/x:entity/x:label", @@ -158,13 +162,14 @@ def test_save_to_with_entity_id__puts_save_tos_on_bind(self): self.assertPyxformXform( name="data", md=""" - | survey | | | | | - | | type | name | label | save_to | - | | text | id | Tree id | | - | | text | a | A | foo | - | entities | | | | | - | | dataset | entity_id | | | - | | trees | ${id} | | | + | survey | | | | | + | | type | name | label | save_to | + | | text | id | Tree id | | + | | text | a | A | foo | + | | csv-external | trees | | | + | entities | | | | | + | | dataset | entity_id | | | + | | trees | ${id} | | | """, xml__xpath_match=[ '/h:html/h:head/x:model/x:bind[@nodeset = "/data/a" and @entities:saveto = "foo"]'