Commit adc1656a authored by felix.herrmann's avatar felix.herrmann
Browse files

fix(testdata): alter dhrep fixtures and datasets dsmo creation to reflect moved categories fields

parent 751a55eb
......@@ -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")
......
[
{
"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": [],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment