Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
compendium-v2
Commits
6e8812aa
Commit
6e8812aa
authored
1 year ago
by
Remco Tukker
Browse files
Options
Downloads
Patches
Plain Diff
add testcase
parent
45aeb408
No related branches found
No related tags found
1 merge request
!66
Conversion of services data
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compendium_v2/conversion/conversion.py
+1
-0
1 addition, 0 deletions
compendium_v2/conversion/conversion.py
test/test_conversion.py
+17
-1
17 additions, 1 deletion
test/test_conversion.py
with
18 additions
and
1 deletion
compendium_v2/conversion/conversion.py
+
1
−
0
View file @
6e8812aa
...
...
@@ -5,6 +5,7 @@ conversion
This module loads the survey data from 2022 from the survey database
and stores the data in the json structure of the new survey, so that
it can be used to prefill the 2023 survey.
It also loads an xlsx file with the data for the services questions.
"""
import
logging
...
...
This diff is collapsed.
Click to expand it.
test/test_conversion.py
+
17
−
1
View file @
6e8812aa
...
...
@@ -4,7 +4,7 @@ from sqlalchemy.orm import lazyload
from
compendium_v2.db
import
db
from
compendium_v2.db.model
import
NREN
from
compendium_v2.db.survey_model
import
Survey
,
SurveyResponse
,
SurveyStatus
from
compendium_v2.conversion.conversion
import
_cli
,
convert_answers
from
compendium_v2.conversion.conversion
import
_cli
,
convert_answers
,
load_service_data
def
mock_convert_answers
(
_
):
...
...
@@ -72,3 +72,19 @@ def test_conversion():
}
}
}
def
test_load_service_data
():
service_data_dict
=
load_service_data
()
assert
len
(
service_data_dict
.
keys
())
==
42
assert
len
(
service_data_dict
[
'
ARNES
'
].
keys
())
==
8
assert
len
(
service_data_dict
[
'
ARNES
'
][
'
services_identity
'
])
==
3
assert
len
(
service_data_dict
[
'
SURF
'
].
keys
())
==
7
assert
len
(
service_data_dict
[
'
SURF
'
][
'
services_network
'
])
==
10
assert
service_data_dict
[
'
SURF
'
][
'
services_security
'
][
'
security-audit
'
]
==
{
'
offered
'
:
[
'
yes
'
],
'
name
'
:
'
SURFaudit
'
,
'
additional_information
'
:
'
The Standard for Information Security in Higher Education is the basis of
'
'
SURFaudit’s self-assessment.
\n\n
SURFaudit Security Standard for Higher
'
'
Education is derived from the ISO/IEC 27002:2013 standard
'
}
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