Skip to content

Commit

Permalink
add more test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rieven committed Jan 10, 2025
1 parent f65461a commit 59714b0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions rocky/tests/onboarding/test_onboarding_organization_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,29 @@ def test_onboarding_ooi_detail_scan(
assertContains(response, "Start scanning")


@pytest.mark.parametrize("member", ["superuser_member", "admin_member", "redteam_member", "client_member"])
def test_onboarding_ooi_detail_scan_create_report_schedule(
request, mocker, member, mock_bytes_client, rf, mock_organization_view_octopoes, url
):
member = request.getfixturevalue(member)

mocker.patch("account.mixins.OrganizationView.get_katalogus")
mock_organization_view_octopoes().get.return_value = url
mock_bytes_client().upload_raw.return_value = "raw_id"

request_url = (
reverse("step_setup_scan_ooi_detail", kwargs={"organization_code": member.organization.code})
+ f"?report_type=dns-report&ooi={url.primary_key}"
)

response = OnboardingSetupScanOOIDetailView.as_view()(
setup_request(rf.post(request_url), member.user), organization_code=member.organization.code
)

assert response.status_code == 302
assert "recipe_id" in response.url


@pytest.mark.parametrize("member", ["superuser_member", "admin_member", "redteam_member", "client_member"])
def test_onboarding_scanning_boefjes(
request, member, rf, mock_organization_view_octopoes, url, mocker, mock_bytes_client
Expand Down

0 comments on commit 59714b0

Please sign in to comment.