Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
e3bfe64e
"src/git@git.app.uib.no:Eskil.Yttri/lab-3-v-23.git" did not exist on "2116f463854553a531ac4c5af5e9c92009717b12"
Commit
e3bfe64e
authored
3 years ago
by
Jonas Braathen
Browse files
Options
Downloads
Patches
Plain Diff
Add Cerebrum and OrgReg client configs to testing settings
parent
7399860a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
greg/tests/test_tasks.py
+3
-3
3 additions, 3 deletions
greg/tests/test_tasks.py
gregsite/settings/testing.py
+14
-0
14 additions, 0 deletions
gregsite/settings/testing.py
with
17 additions
and
3 deletions
greg/tests/test_tasks.py
+
3
−
3
View file @
e3bfe64e
...
...
@@ -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
"
)
...
...
This diff is collapsed.
Click to expand it.
gregsite/settings/testing.py
+
14
−
0
View file @
e3bfe64e
...
...
@@ -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
=
[]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment