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
294f8b18
Commit
294f8b18
authored
2 years ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
fix test data creation with new models
parent
07269699
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/conftest.py
+2
-4
2 additions, 4 deletions
test/conftest.py
with
2 additions
and
4 deletions
test/conftest.py
+
2
−
4
View file @
294f8b18
...
...
@@ -71,14 +71,13 @@ def mocked_db(mocker):
def
test_budget_data
():
with
db
.
session_scope
()
as
session
:
data
=
_test_data_csv
(
"
BudgetTestData.csv
"
)
for
index
,
row
in
enumerate
(
data
)
:
for
row
in
data
:
nren
=
row
[
"
nren
"
]
budget
=
row
[
"
budget
"
]
year
=
row
[
"
year
"
]
session
.
add
(
model
.
BudgetEntry
(
id
=
index
+
1
,
nren
=
nren
,
budget
=
float
(
budget
),
year
=
int
(
year
))
...
...
@@ -89,7 +88,7 @@ def test_budget_data():
def
test_funding_source_data
():
with
db
.
session_scope
()
as
session
:
data
=
_test_data_csv
(
"
FundingSourceTestData.csv
"
)
for
index
,
row
in
enumerate
(
data
)
:
for
row
in
data
:
nren
=
row
[
"
nren
"
]
year
=
row
[
"
year
"
]
client
=
row
[
"
client
"
]
...
...
@@ -100,7 +99,6 @@ def test_funding_source_data():
session
.
add
(
model
.
FundingSource
(
id
=
index
+
1
,
nren
=
nren
,
year
=
year
,
client_institutions
=
client
,
european_funding
=
european
,
...
...
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