Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Discuss Data Project
Discuss Data
Commits
adc1656a
Commit
adc1656a
authored
Jun 08, 2020
by
felix.herrmann
Browse files
fix(testdata): alter dhrep fixtures and datasets dsmo creation to reflect moved categories fields
parent
751a55eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
discuss_data/dddatasets/tests/test_models.py
View file @
adc1656a
...
...
@@ -3,7 +3,7 @@ from django.urls import reverse
from
guardian.shortcuts
import
get_perms
from
discuss_data.dddatasets.models
import
DataSetManagementObject
from
discuss_data.dddatasets.models
import
DataSetManagementObject
,
Category
from
discuss_data.ddusers.models
import
User
...
...
@@ -26,7 +26,9 @@ def test_dsmo_access_assign_perm():
name_prefix
=
"Commander"
,
)
riker
.
save
()
dsmo
=
DataSetManagementObject
(
owner
=
picard
)
category
=
Category
(
id
=
1
,
name
=
"Other"
)
category
.
save
()
dsmo
=
DataSetManagementObject
(
owner
=
picard
,
main_category
=
category
)
dsmo
.
save
()
dsmo
.
assign_user_permissions
(
riker
,
"view"
)
...
...
discuss_data/dhrep/fixtures/dataset_data.json
View file @
adc1656a
[
{
"model"
:
"dddatasets.category"
,
"pk"
:
1
,
"fields"
:
{
"name"
:
"Other"
,
"slug"
:
"other"
,
"description"
:
"Other category"
,
"curators"
:
[],
"sponsors"
:
[]
}
},
{
"model"
:
"dddatasets.datafile"
,
"pk"
:
1
,
...
...
@@ -141,6 +152,7 @@
"doi"
:
""
,
"published"
:
false
,
"main_published_ds"
:
null
,
"categories"
:
[],
"groups"
:
[
1
,
2
...
...
@@ -177,7 +189,6 @@
"dataset_management_object"
:
1
,
"published"
:
false
,
"groups"
:
[],
"categories"
:
[],
"countries"
:
[],
"datatypes"
:
[],
"related_dataset"
:
[],
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment