-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: upgrade fixture-based test for instance_xmlns setting
- The test was broken by changes to choices processing (#603). - The test conditions seem to relate only to the instance_xmlns feature. - The new test asserts the same using the pyxformtestcase pattern.
- Loading branch information
1 parent
75b071c
commit e204ab7
Showing
4 changed files
with
47 additions
and
82 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from tests.pyxform_test_case import PyxformTestCase | ||
|
||
|
||
class TestSettings(PyxformTestCase): | ||
|
||
def test_instance_xmlns__is_set__custom_xmlns(self): | ||
"""Should find the instance_xmlns value in the instance xmlns attribute.""" | ||
md = """ | ||
| settings | | ||
| | instance_xmlns | | ||
| | 1234 | | ||
| survey | | | | | ||
| | type | name | label | | ||
| | text | q1 | hello | | ||
""" | ||
self.assertPyxformXform( | ||
md=md, | ||
xml__xpath_match=[ | ||
""" | ||
/h:html/h:head/x:model/x:instance/*[ | ||
local-name()='test_name' | ||
and @id='test_id' | ||
and namespace-uri()='1234' | ||
] | ||
""" | ||
] | ||
) | ||
|
||
def test_instance_xmlns__not_set__default_xmlns(self): | ||
"""Should find the default xmlns for the instance element.""" | ||
md = """ | ||
| survey | | | | | ||
| | type | name | label | | ||
| | text | q1 | hello | | ||
""" | ||
self.assertPyxformXform( | ||
md=md, | ||
xml__xpath_match=[ | ||
""" | ||
/h:html/h:head/x:model/x:instance/*[ | ||
local-name()='test_name' | ||
and @id='test_id' | ||
and namespace-uri()='http://www.w3.org/2002/xforms' | ||
] | ||
""" | ||
], | ||
) |
This file was deleted.
Oops, something went wrong.