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
9e924a64
Commit
9e924a64
authored
2 years ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
verify the staff data from v1 publisher
parent
a01d82ff
No related branches found
No related tags found
1 merge request
!13
publisher v1 staffing migration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_survey_publisher_v1.py
+45
-0
45 additions, 0 deletions
test/test_survey_publisher_v1.py
with
45 additions
and
0 deletions
test/test_survey_publisher_v1.py
+
45
−
0
View file @
9e924a64
...
...
@@ -23,3 +23,48 @@ def test_publisher(client, mocker, dummy_config):
assert
funding_source_count
charging_structure_count
=
session
.
query
(
model
.
ChargingStructure
.
year
).
count
()
assert
charging_structure_count
staff_data
=
session
.
query
(
model
.
NrenStaff
).
order_by
(
model
.
NrenStaff
.
year
.
asc
()).
all
()
# data should only be saved for the NRENs we have saved in the database
staff_data_nrens
=
set
([
staff
.
nren
.
name
for
staff
in
staff_data
])
assert
len
(
staff_data_nrens
)
==
len
(
nren_names
)
-
1
# no UoM data
kifu_data
=
[
staff
for
staff
in
staff_data
if
staff
.
nren
.
name
==
'
KIFU
'
]
# check that the data is saved correctly for KIFU, it should be OK for the rest then..
assert
len
(
kifu_data
)
==
6
assert
kifu_data
[
0
].
year
==
2016
assert
kifu_data
[
0
].
permanent_fte
==
100
assert
kifu_data
[
0
].
subcontracted_fte
==
2
assert
kifu_data
[
0
].
technical_fte
==
0
assert
kifu_data
[
0
].
non_technical_fte
==
0
assert
kifu_data
[
1
].
year
==
2017
assert
kifu_data
[
1
].
permanent_fte
==
80
assert
kifu_data
[
1
].
subcontracted_fte
==
2
assert
kifu_data
[
1
].
technical_fte
==
0
assert
kifu_data
[
1
].
non_technical_fte
==
0
assert
kifu_data
[
2
].
year
==
2018
assert
kifu_data
[
2
].
permanent_fte
==
80
assert
kifu_data
[
2
].
subcontracted_fte
==
3
assert
kifu_data
[
2
].
technical_fte
==
0
assert
kifu_data
[
2
].
non_technical_fte
==
0
assert
kifu_data
[
3
].
year
==
2019
assert
kifu_data
[
3
].
permanent_fte
==
148
assert
kifu_data
[
3
].
subcontracted_fte
==
4
assert
kifu_data
[
3
].
technical_fte
==
117
assert
kifu_data
[
3
].
non_technical_fte
==
33
assert
kifu_data
[
4
].
year
==
2020
assert
kifu_data
[
4
].
permanent_fte
==
190
assert
kifu_data
[
4
].
subcontracted_fte
==
3
assert
kifu_data
[
4
].
technical_fte
==
133
assert
kifu_data
[
4
].
non_technical_fte
==
60
assert
kifu_data
[
5
].
year
==
2021
assert
kifu_data
[
5
].
permanent_fte
==
178
assert
kifu_data
[
5
].
subcontracted_fte
==
3
assert
kifu_data
[
5
].
technical_fte
==
133
assert
kifu_data
[
5
].
non_technical_fte
==
45
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