Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add forgotten tests for helper #380

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Conversation

dragon-dxw
Copy link
Collaborator

Changes in this PR:

Trello card / Rollbar error (etc)

  • Requires env variable(s) to be updated

@dragon-dxw dragon-dxw closed this Sep 7, 2023
@dragon-dxw dragon-dxw changed the title Add forgotten test helper Add forgotten tests for helper Sep 7, 2023
@dragon-dxw dragon-dxw reopened this Sep 7, 2023
def test_xpath_single():
node = lxml.etree.fromstring("<root><cat>1</cat><cat>2</cat></root>")
path = "//cat/text()"
assert get_xpath_match_string(node, path) == "1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with this PR as stands, note for future that we should probably rename this to get_xpath_first_matching_string or similar, or have this method error out if it has more than one match

@dragon-dxw dragon-dxw force-pushed the manifestation-date-access branch from 81797b4 to 43aed52 Compare September 12, 2023 13:22
@dragon-dxw dragon-dxw merged commit 0d592d4 into main Sep 12, 2023
@dragon-dxw dragon-dxw deleted the manifestation-date-access branch September 12, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants