Skip to content
Snippets Groups Projects
Commit e3bfe64e authored by Jonas Braathen's avatar Jonas Braathen
Browse files

Add Cerebrum and OrgReg client configs to testing settings

parent 7399860a
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@ def orgreg_response():
@pytest.mark.django_db
def test_command_ou_init(requests_mock, old_identifier, orgreg_response):
requests_mock.get("https://example.com/fake/ou/", text=orgreg_response.json())
requests_mock.get("https://example.com/orgreg/ou/", text=orgreg_response.json())
assert OrganizationalUnit.objects.all().count() == 1
import_from_orgreg()
......@@ -124,7 +124,7 @@ def test_command_ou_init(requests_mock, old_identifier, orgreg_response):
@pytest.mark.django_db
def test_run_twice(requests_mock, orgreg_response):
requests_mock.get("https://example.com/fake/ou/", text=orgreg_response.json())
requests_mock.get("https://example.com/orgreg/ou/", text=orgreg_response.json())
assert OrganizationalUnit.objects.all().count() == 0
......@@ -137,7 +137,7 @@ def test_run_twice(requests_mock, orgreg_response):
@pytest.mark.django_db
def test_import_acronym(requests_mock, orgreg_response):
requests_mock.get("https://example.com/fake/ou/", text=orgreg_response.json())
requests_mock.get("https://example.com/orgreg/ou/", text=orgreg_response.json())
settings.ORGREG_ACRONYMS.append("nob")
......
......@@ -10,3 +10,17 @@ AUTHENTICATION_BACKENDS = [
OIDC_RP_CLIENT_ID = "lalalalala"
OIDC_RP_CLIENT_SECRET = "lalalalala"
CEREBRUM_CLIENT = {
"url": "https://example.com/cerebrum/",
"headers": {"X-Gravitee-Api-Key": "bar"},
}
CEREBRUM_HIERARCHICAL_ACCESS = True
ORGREG_CLIENT = {
"endpoints": {"base_url": "https://example.com/orgreg/"},
"headers": {"X-Gravitee-Api-Key": "foo"},
}
ORGREG_EXTRA_IDS = []
ORGREG_ACRONYMS = []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment