Skip to content

Commit

Permalink
feat(tests): add ODK configuration file and refactor submission handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuj-Gupta4 committed Nov 28, 2024
1 parent f1b1831 commit f6694ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/backend/tests/.pyodk_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[central]
base_url = "https://proxy"
username = "[email protected]"
password = "Password1234"
7 changes: 1 addition & 6 deletions src/backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,13 @@ def forms(base_url, auth, pid):
"""

with Client(config_path=odk_config_file) as client:
client.submissions.create(
submission_data = client.submissions.create(
project_id=odk_project_id,
form_id=odk_form_id,
xml=submission_xml,
device_id=None,
encoding="utf-8",
)
submission_data = client.submissions.get(
project_id=odk_project_id,
form_id=odk_form_id,
instance_id=submission_id,
)

yield {
"project": odk_project,
Expand Down

0 comments on commit f6694ae

Please sign in to comment.