@@ -38,18 +38,18 @@ def test_issue_0003():
3838 )
3939 # on export, a single item should be wrapped in a list, where the property expects an array
4040 expected = {
41- "@context" : {"vocab" : "https://openminds.ebrains.eu/vocab/" },
41+ "@context" : {"@ vocab" : "https://openminds.ebrains.eu/vocab/" },
4242 "@type" : "https://openminds.ebrains.eu/core/FileArchive" ,
43- "vocab: IRI" : "http://example.com/archive.zip" ,
44- "vocab: format" : {
43+ "IRI" : "http://example.com/archive.zip" ,
44+ "format" : {
4545 "@type" : "https://openminds.ebrains.eu/core/ContentType" ,
46- "vocab: name" : "application/zip" ,
46+ "name" : "application/zip" ,
4747 },
48- "vocab: sourceData" : [
48+ "sourceData" : [
4949 {
5050 "@type" : "https://openminds.ebrains.eu/core/File" ,
51- "vocab: IRI" : "http://example.com/some_file.txt" ,
52- "vocab: name" : "some_file.txt" ,
51+ "IRI" : "http://example.com/some_file.txt" ,
52+ "name" : "some_file.txt" ,
5353 }
5454 ],
5555 }
@@ -89,22 +89,22 @@ def test_issue0007():
8989
9090 actual = person .to_jsonld (include_empty_properties = False , embed_linked_nodes = False , with_context = True )
9191 expected = {
92- "@context" : {"vocab" : "https://openminds.ebrains.eu/vocab/" },
92+ "@context" : {"@ vocab" : "https://openminds.ebrains.eu/vocab/" },
9393 "@id" : "_:001" ,
9494 "@type" : "https://openminds.ebrains.eu/core/Person" ,
95- "vocab: familyName" : "Professor" ,
96- "vocab: givenName" : "A" ,
97- "vocab: affiliation" : [
95+ "familyName" : "Professor" ,
96+ "givenName" : "A" ,
97+ "affiliation" : [
9898 {
9999 "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
100- "vocab: memberOf" : {
100+ "memberOf" : {
101101 "@id" : "_:002" ,
102102 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
103103 },
104104 },
105105 {
106106 "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
107- "vocab: memberOf" : {
107+ "memberOf" : {
108108 "@id" : "_:003" ,
109109 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
110110 },
@@ -121,39 +121,39 @@ def test_issue0007():
121121 saved_data = json .load (fp )
122122 os .remove ("issue0007.jsonld" )
123123 expected_saved_data = {
124- "@context" : {"vocab" : "https://openminds.ebrains.eu/vocab/" },
124+ "@context" : {"@ vocab" : "https://openminds.ebrains.eu/vocab/" },
125125 "@graph" : [
126126 {
127127 "@id" : "_:001" ,
128128 "@type" : "https://openminds.ebrains.eu/core/Person" ,
129- "vocab: affiliation" : [
129+ "affiliation" : [
130130 {
131131 "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
132- "vocab: memberOf" : {
132+ "memberOf" : {
133133 "@id" : "_:002" ,
134134 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
135135 },
136136 },
137137 {
138138 "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
139- "vocab: memberOf" : {
139+ "memberOf" : {
140140 "@id" : "_:003" ,
141141 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
142142 },
143143 },
144144 ],
145- "vocab: familyName" : "Professor" ,
146- "vocab: givenName" : "A" ,
145+ "familyName" : "Professor" ,
146+ "givenName" : "A" ,
147147 },
148148 {
149149 "@id" : "_:002" ,
150150 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
151- "vocab: fullName" : "University of This Place" ,
151+ "fullName" : "University of This Place" ,
152152 },
153153 {
154154 "@id" : "_:003" ,
155155 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
156- "vocab: fullName" : "University of That Place" ,
156+ "fullName" : "University of That Place" ,
157157 },
158158 ],
159159 }
@@ -174,20 +174,20 @@ def test_issue0008():
174174 )
175175 actual = person .to_jsonld (include_empty_properties = False , embed_linked_nodes = False , with_context = True )
176176 expected = {
177- "@context" : {"vocab" : "https://openminds.ebrains.eu/vocab/" },
177+ "@context" : {"@ vocab" : "https://openminds.ebrains.eu/vocab/" },
178178 "@id" : "_:002" ,
179179 "@type" : "https://openminds.ebrains.eu/core/Person" ,
180- "vocab: affiliation" : [
180+ "affiliation" : [
181181 {
182182 "@type" : "https://openminds.ebrains.eu/core/Affiliation" ,
183- "vocab: endDate" : "2023-09-30" ,
184- "vocab: memberOf" : {
183+ "endDate" : "2023-09-30" ,
184+ "memberOf" : {
185185 "@id" : "_:001" ,
186186 "@type" : "https://openminds.ebrains.eu/core/Organization" ,
187187 },
188188 }
189189 ],
190- "vocab: familyName" : "Professor" ,
191- "vocab: givenName" : "A" ,
190+ "familyName" : "Professor" ,
191+ "givenName" : "A" ,
192192 }
193193 assert actual == expected
0 commit comments