Skip to content

Commit

Permalink
Debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherSpelt committed Nov 20, 2024
1 parent 3fba124 commit 8e7169f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions amt/services/task_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ def is_requirement_applicable(requirement: Requirement, ai_act_profile: AiActPro

# We can assume the ai_act_profile field always contains exactly 1 element.
requirement_profile = requirement.ai_act_profile[0]
comparison_attrs = [
comparison_attrs = (
"type",
"risk_category",
"type",
"open_source",
"systemic_risk",
"transparency_obligations",
]
)

for attr in comparison_attrs:
requirement_attr_values = getattr(requirement_profile, attr, [])
Expand Down Expand Up @@ -75,8 +75,8 @@ async def get_requirements_and_measures(

def _parse_attribute_values(attr: str, ai_act_profile: AiActProfile) -> set[str]:
"""
Helper function needed in `is_requirement_applicable`, handling special case for `role`
and `publication_category`.
Helper function needed in `is_requirement_applicable`, handling special case for 'role'
and 'publication_category'.
"""
if attr == "role":
return {s.strip() for s in getattr(ai_act_profile, attr, "").split("+")}
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/test_create_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def test_e2e_create_algorithm(page: Page):
button.click()

button = page.locator("#button-new-algorithm-create")
button.click()
with page.expect_response("/algorithms/new", timeout=10000) as response_info:
button.click()

page.wait_for_timeout(10000)

expect(page.get_by_text("My new algorithm").first).to_be_visible()

Expand Down

0 comments on commit 8e7169f

Please sign in to comment.