oldaplib 0.3.30__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oldaplib/ontologies/admin-testing.trig +62 -11
- oldaplib/ontologies/admin.trig +12 -51
- oldaplib/ontologies/gaga.trigs +23 -0
- oldaplib/ontologies/oldap.trig +138 -62
- oldaplib/src/connection.py +39 -34
- oldaplib/src/enums/adminpermissions.py +1 -1
- oldaplib/src/enums/datapermissions.py +24 -4
- oldaplib/src/enums/{permissionsetattr.py → roleattr.py} +2 -3
- oldaplib/src/enums/userattr.py +3 -2
- oldaplib/src/helpers/observable_dict.py +1 -0
- oldaplib/src/in_project.py +0 -1
- oldaplib/src/objectfactory.py +349 -104
- oldaplib/src/propertyclass.py +1 -1
- oldaplib/src/{permissionset.py → role.py} +90 -112
- oldaplib/src/user.py +183 -97
- oldaplib/src/userdataclass.py +67 -38
- oldaplib/src/version.py +1 -1
- oldaplib/test/test_datamodel.py +5 -2
- oldaplib/test/test_in_project.py +21 -20
- oldaplib/test/test_objectfactory.py +100 -34
- oldaplib/test/test_resourceclass.py +3 -3
- oldaplib/test/test_role.py +407 -0
- oldaplib/test/test_user.py +159 -98
- oldaplib/testdata/instances_test.trig +48 -26
- {oldaplib-0.3.30.dist-info → oldaplib-0.4.1.dist-info}/METADATA +1 -1
- {oldaplib-0.3.30.dist-info → oldaplib-0.4.1.dist-info}/RECORD +27 -26
- oldaplib/test/test_permissionset.py +0 -443
- {oldaplib-0.3.30.dist-info → oldaplib-0.4.1.dist-info}/WHEEL +0 -0
|
@@ -9,6 +9,7 @@ import jwt
|
|
|
9
9
|
|
|
10
10
|
from oldaplib.src.cachesingleton import CacheSingletonRedis
|
|
11
11
|
from oldaplib.src.datamodel import DataModel
|
|
12
|
+
from oldaplib.src.enums.adminpermissions import AdminPermission
|
|
12
13
|
from oldaplib.src.objectfactory import ResourceInstanceFactory, SortBy, ResourceInstance
|
|
13
14
|
from oldaplib.src.connection import Connection
|
|
14
15
|
from oldaplib.src.enums.action import Action
|
|
@@ -18,7 +19,7 @@ from oldaplib.src.helpers.attributechange import AttributeChange
|
|
|
18
19
|
from oldaplib.src.helpers.context import Context
|
|
19
20
|
from oldaplib.src.helpers.langstring import LangString
|
|
20
21
|
from oldaplib.src.helpers.oldaperror import OldapErrorNotFound, OldapErrorValue, OldapErrorNoPermission, OldapErrorInUse
|
|
21
|
-
from oldaplib.src.
|
|
22
|
+
from oldaplib.src.role import Role
|
|
22
23
|
from oldaplib.src.project import Project
|
|
23
24
|
from oldaplib.src.user import User
|
|
24
25
|
from oldaplib.src.xsd.iri import Iri
|
|
@@ -110,17 +111,16 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
110
111
|
cls._connection.upload_turtle(file)
|
|
111
112
|
|
|
112
113
|
user = User.read(cls._connection, "rosenth")
|
|
113
|
-
user.
|
|
114
|
+
user.hasRole[Xsd_QName('oldap:Unknown')] = DataPermission.DATA_UPDATE
|
|
114
115
|
user.update()
|
|
115
116
|
|
|
116
|
-
ps =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
definedByProject="test")
|
|
117
|
+
ps = Role(con=cls._connection,
|
|
118
|
+
roleId="testNoUpdate",
|
|
119
|
+
label=LangString("testNoUpdate@en"),
|
|
120
|
+
comment=LangString("Testing PermissionSet@en"),
|
|
121
|
+
definedByProject="test")
|
|
122
122
|
ps.create()
|
|
123
|
-
cls._tps = ps.read(con=cls._connection,
|
|
123
|
+
cls._tps = ps.read(con=cls._connection, roleId="testNoUpdate", definedByProject="test")
|
|
124
124
|
|
|
125
125
|
user = User(con=cls._connection,
|
|
126
126
|
userId=Xsd_NCName("factorytestuser"),
|
|
@@ -129,10 +129,27 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
129
129
|
email="ft@test.com",
|
|
130
130
|
credentials="Waseliwas",
|
|
131
131
|
inProject={'oldap:Test': {}},
|
|
132
|
-
|
|
132
|
+
hasRole={ps.iri.as_qname: DataPermission.DATA_VIEW},
|
|
133
133
|
isActive=True)
|
|
134
134
|
user.create()
|
|
135
135
|
cls._tuser = User.read(cls._connection, "factorytestuser")
|
|
136
|
+
|
|
137
|
+
user = User(con=cls._connection,
|
|
138
|
+
userId=Xsd_NCName("factorytestuser2"),
|
|
139
|
+
familyName="FactoryTest2",
|
|
140
|
+
givenName="FactoryTest2",
|
|
141
|
+
email="ft2@test.com",
|
|
142
|
+
credentials="Waseliwas2",
|
|
143
|
+
inProject={'oldap:Test': {AdminPermission.ADMIN_CREATE}},
|
|
144
|
+
hasRole={ps.iri.as_qname: DataPermission.DATA_VIEW, Xsd_QName('oldap:Unknown'): DataPermission.DATA_UPDATE},
|
|
145
|
+
isActive=True)
|
|
146
|
+
user.create()
|
|
147
|
+
cls._tuser2 = User.read(cls._connection, "factorytestuser")
|
|
148
|
+
|
|
149
|
+
cls._con_tuser2 = Connection(userId="factorytestuser2",
|
|
150
|
+
credentials="Waseliwas2",
|
|
151
|
+
context_name="DEFAULT")
|
|
152
|
+
|
|
136
153
|
cache = CacheSingletonRedis()
|
|
137
154
|
cache.clear()
|
|
138
155
|
|
|
@@ -144,14 +161,40 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
144
161
|
#sleep(1) # upload may take a while...
|
|
145
162
|
pass
|
|
146
163
|
|
|
164
|
+
def test_constructor_only(self):
|
|
165
|
+
project = Project.read(con=self._connection, projectIri_SName='test')
|
|
166
|
+
factory = ResourceInstanceFactory(con=self._connection, project=project)
|
|
167
|
+
Book = factory.createObjectInstance('Book')
|
|
168
|
+
|
|
169
|
+
b = Book(title="Hitchhiker's Guide to the Galaxy",
|
|
170
|
+
author=Iri('test:DouglasAdams', validate=False),
|
|
171
|
+
pubDate="1995-09-27",
|
|
172
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW,
|
|
173
|
+
Xsd_QName('hyha:HyperHamletMember'): DataPermission.DATA_PERMISSIONS})
|
|
174
|
+
self.assertEqual(b.title, {Xsd_string("Hitchhiker's Guide to the Galaxy")})
|
|
175
|
+
self.assertEqual(b.author, {Iri('test:DouglasAdams')})
|
|
176
|
+
self.assertEqual(b.pubDate, {Xsd_date("1995-09-27")})
|
|
177
|
+
self.assertIsNotNone(b.creationDate)
|
|
178
|
+
self.assertEqual(b.createdBy, Iri('https://orcid.org/0000-0003-1681-4036', validate=False))
|
|
179
|
+
self.assertIsNotNone(b.lastModificationDate)
|
|
180
|
+
self.assertEqual(b.lastModifiedBy, Iri('https://orcid.org/0000-0003-1681-4036', validate=False))
|
|
181
|
+
self.assertEqual(dict(b.attachedToRole), {Xsd_QName("oldap:Unknown"): DataPermission.DATA_VIEW,
|
|
182
|
+
Xsd_QName("hyha:HyperHamletMember"): DataPermission.DATA_PERMISSIONS})
|
|
183
|
+
|
|
184
|
+
|
|
147
185
|
def test_constructor_A(self):
|
|
148
186
|
project = Project.read(con=self._connection, projectIri_SName='test')
|
|
149
187
|
factory = ResourceInstanceFactory(con=self._connection, project=project)
|
|
150
188
|
Book = factory.createObjectInstance('Book')
|
|
189
|
+
|
|
190
|
+
project = Project.read(con=self._connection, projectIri_SName='test')
|
|
191
|
+
factory = ResourceInstanceFactory(con=self._connection, project=project)
|
|
192
|
+
Book = factory.createObjectInstance('Book')
|
|
193
|
+
|
|
151
194
|
b = Book(title="Hitchhiker's Guide to the Galaxy",
|
|
152
195
|
author=Iri('test:DouglasAdams', validate=False),
|
|
153
196
|
pubDate="1995-09-27",
|
|
154
|
-
|
|
197
|
+
attachedToRole={Xsd_QName('hyha:HyperHamletMember'): DataPermission.DATA_PERMISSIONS})
|
|
155
198
|
self.assertEqual(b.title, {Xsd_string("Hitchhiker's Guide to the Galaxy")})
|
|
156
199
|
self.assertEqual(b.author, {Iri('test:DouglasAdams')})
|
|
157
200
|
self.assertEqual(b.pubDate, {Xsd_date("1995-09-27")})
|
|
@@ -159,6 +202,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
159
202
|
self.assertEqual(b.createdBy, Iri('https://orcid.org/0000-0003-1681-4036', validate=False))
|
|
160
203
|
self.assertIsNotNone(b.lastModificationDate)
|
|
161
204
|
self.assertEqual(b.lastModifiedBy, Iri('https://orcid.org/0000-0003-1681-4036', validate=False))
|
|
205
|
+
self.assertEqual(dict(b.attachedToRole), {Xsd_QName('hyha:HyperHamletMember'): DataPermission.DATA_PERMISSIONS})
|
|
162
206
|
b.create()
|
|
163
207
|
b2 = Book.read(con=self._connection,
|
|
164
208
|
iri=b.iri)
|
|
@@ -169,6 +213,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
169
213
|
self.assertEqual(b2.creationDate, b.creationDate)
|
|
170
214
|
self.assertEqual(b2.lastModifiedBy, b.lastModifiedBy)
|
|
171
215
|
self.assertEqual(b2.lastModificationDate, b.lastModificationDate)
|
|
216
|
+
self.assertEqual(dict(b2.attachedToRole), {Xsd_QName('hyha:HyperHamletMember'): DataPermission.DATA_PERMISSIONS})
|
|
172
217
|
|
|
173
218
|
#
|
|
174
219
|
# test unprivileged access. Should return "not found"-Error!
|
|
@@ -181,7 +226,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
181
226
|
pageNum=1,
|
|
182
227
|
pageDescription=LangString("Cover page of book@en", "Vorderseite des Bucheinschlags@de"),
|
|
183
228
|
pageInBook="test:Hitchhiker",
|
|
184
|
-
|
|
229
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
185
230
|
self.assertEqual(p1.pageDesignation, {"Cover"})
|
|
186
231
|
self.assertEqual(p1.pageNum, {1})
|
|
187
232
|
self.assertEqual(p1.pageDescription, LangString("Cover page of book@en", "Vorderseite des Bucheinschlags@de"))
|
|
@@ -197,7 +242,12 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
197
242
|
self.assertEqual(p2.lastModificationDate, p1.lastModificationDate)
|
|
198
243
|
|
|
199
244
|
b2.delete()
|
|
245
|
+
with self.assertRaises(OldapErrorNotFound):
|
|
246
|
+
tmp = Book.read(con=self._connection, iri=b2.iri)
|
|
247
|
+
|
|
200
248
|
p2.delete()
|
|
249
|
+
with self.assertRaises(OldapErrorNotFound):
|
|
250
|
+
tmp = Page.read(con=self._connection, iri=p2.iri)
|
|
201
251
|
|
|
202
252
|
def test_constructor_B(self):
|
|
203
253
|
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
@@ -242,7 +292,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
242
292
|
unsignedShortProp=Xsd_unsignedShort(20200),
|
|
243
293
|
unsignedByteProp=Xsd_unsignedByte(202),
|
|
244
294
|
positiveIntegerProp=Xsd_unsignedByte(202),
|
|
245
|
-
|
|
295
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
246
296
|
self.assertEqual(at.stringProp, {Xsd_string("A String Prop")})
|
|
247
297
|
self.assertEqual(at.langStringProp, LangString("A LangString@en", "Ein Sprachtext@de"))
|
|
248
298
|
self.assertEqual(at.booleanProp, Xsd_boolean(1))
|
|
@@ -337,14 +387,17 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
337
387
|
self.assertEqual(at.positiveIntegerProp, at2.positiveIntegerProp)
|
|
338
388
|
|
|
339
389
|
def test_constructor_C(self):
|
|
340
|
-
factory = ResourceInstanceFactory(con=self.
|
|
390
|
+
factory = ResourceInstanceFactory(con=self._con_tuser2, project='test')
|
|
391
|
+
context = Context(name=self._con_tuser2.context_name)
|
|
341
392
|
Book = factory.createObjectInstance('Book')
|
|
342
393
|
|
|
343
394
|
b = Book(title="History of Time",
|
|
344
395
|
author=[Iri('test:AlbertEinstein', validate=False), Iri('test:JohnWick', validate=False)],
|
|
345
|
-
pubDate="1995-09-27"
|
|
346
|
-
grantsPermission=Iri('oldap:GenericView'))
|
|
396
|
+
pubDate="1995-09-27")
|
|
347
397
|
b.create()
|
|
398
|
+
self.assertEqual(dict(b.attachedToRole), {Xsd_QName("oldap:Unknown"): DataPermission.DATA_UPDATE,
|
|
399
|
+
Xsd_QName("test:testNoUpdate"): DataPermission.DATA_VIEW})
|
|
400
|
+
|
|
348
401
|
|
|
349
402
|
b.delete()
|
|
350
403
|
|
|
@@ -367,11 +420,10 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
367
420
|
imageId='cat.tif',
|
|
368
421
|
path='test',
|
|
369
422
|
protocol='iiif',
|
|
370
|
-
|
|
423
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
371
424
|
mo.create()
|
|
372
425
|
data = ResourceInstance.read_data(con=self._connection, iri=mo.iri, projectShortName='test')
|
|
373
|
-
|
|
374
|
-
self.assertEqual(data[Xsd_QName("oldap:grantsPermission")], ['oldap:GenericView'])
|
|
426
|
+
self.assertEqual(data[Xsd_QName("oldap:attachedToRole")], {Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
375
427
|
self.assertEqual(data[Xsd_QName("shared:originalName")], ['Cat.tif'])
|
|
376
428
|
self.assertEqual(data[Xsd_QName("shared:originalMimeType")], ['image/tiff'])
|
|
377
429
|
self.assertEqual(data[Xsd_QName("shared:serverUrl")], ['http://iiif.oldap.org/iiif/3/'])
|
|
@@ -398,8 +450,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
398
450
|
Book = factory.createObjectInstance('Book')
|
|
399
451
|
b = Book(title="The Life and Times of Scrooge",
|
|
400
452
|
author="test:TuomasHolopainen",
|
|
401
|
-
pubDate="2001-01-01"
|
|
402
|
-
grantsPermission=Iri('oldap:GenericView'))
|
|
453
|
+
pubDate="2001-01-01")
|
|
403
454
|
b.create()
|
|
404
455
|
bb = factory.read(iri=b.iri)
|
|
405
456
|
self.assertEqual(bb.name, "test:Book")
|
|
@@ -567,7 +618,8 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
567
618
|
decimalSetter={Xsd_decimal(3.14159), Xsd_decimal(2.71828), Xsd_decimal(1.61803)},
|
|
568
619
|
integerSetter={-10, 20},
|
|
569
620
|
booleanSetter=True,
|
|
570
|
-
|
|
621
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW,
|
|
622
|
+
self._tps.iri.as_qname: DataPermission.DATA_VIEW})
|
|
571
623
|
obj1.create()
|
|
572
624
|
|
|
573
625
|
unpriv = Connection(userId="factorytestuser",
|
|
@@ -582,6 +634,12 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
582
634
|
self.assertEqual(obj.decimalSetter, {Xsd_decimal(3.14159), Xsd_decimal(2.71828), Xsd_decimal(1.61803)})
|
|
583
635
|
self.assertEqual(obj.integerSetter, {-10, 20})
|
|
584
636
|
|
|
637
|
+
unpriv2 = Connection(userId="factorytestuser2",
|
|
638
|
+
credentials="Waseliwas2",
|
|
639
|
+
context_name="DEFAULT")
|
|
640
|
+
factory = ResourceInstanceFactory(con=unpriv2, project='test')
|
|
641
|
+
SetterTester = factory.createObjectInstance('SetterTester')
|
|
642
|
+
obj = SetterTester.read(con=unpriv2, iri=obj1.iri)
|
|
585
643
|
obj.decimalSetter.discard(Xsd_decimal(3.14159))
|
|
586
644
|
with self.assertRaises(OldapErrorNoPermission):
|
|
587
645
|
obj.update()
|
|
@@ -598,7 +656,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
598
656
|
b = Book(title="Hitchhiker's Guide to the Galaxy",
|
|
599
657
|
author=Iri('test:DouglasAdams', validate=False),
|
|
600
658
|
pubDate="1995-09-27",
|
|
601
|
-
|
|
659
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
602
660
|
b.create()
|
|
603
661
|
b = Book.read(con=self._connection,
|
|
604
662
|
iri=b.iri)
|
|
@@ -607,7 +665,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
607
665
|
pageNum=1,
|
|
608
666
|
pageDescription=LangString("Cover page of book@en", "Vorderseite des Bucheinschlags@de"),
|
|
609
667
|
pageInBook=b.iri,
|
|
610
|
-
|
|
668
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
611
669
|
p1.create()
|
|
612
670
|
|
|
613
671
|
with self.assertRaises(OldapErrorInUse):
|
|
@@ -622,15 +680,14 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
622
680
|
b = Book.read(con=self._connection,
|
|
623
681
|
iri=b.iri)
|
|
624
682
|
|
|
625
|
-
def
|
|
683
|
+
def test_change_permissions_A(self):
|
|
626
684
|
project = Project.read(con=self._connection, projectIri_SName='test')
|
|
627
685
|
|
|
628
|
-
ps =
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
definedByProject="test")
|
|
686
|
+
ps = Role(con=self._connection,
|
|
687
|
+
roleId="testChangePermission",
|
|
688
|
+
label=LangString("testChangePermission@en"),
|
|
689
|
+
comment=LangString("Testing PermissionSet@en"),
|
|
690
|
+
definedByProject="test")
|
|
634
691
|
ps.create()
|
|
635
692
|
|
|
636
693
|
factory = ResourceInstanceFactory(con=self._connection, project=project)
|
|
@@ -639,13 +696,17 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
639
696
|
b = Book(title="Hitchhiker's Guide to the Galaxy",
|
|
640
697
|
author=Iri('test:DouglasAdams', validate=False),
|
|
641
698
|
pubDate="1995-09-27",
|
|
642
|
-
|
|
699
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
643
700
|
b.create()
|
|
644
701
|
b = Book.read(con=self._connection,
|
|
645
702
|
iri=b.iri)
|
|
646
|
-
b.
|
|
703
|
+
b.attachedToRole[Xsd_QName('hyha:HyperHamletMember')] = DataPermission.DATA_UPDATE
|
|
647
704
|
b.update()
|
|
648
705
|
|
|
706
|
+
b = Book.read(con=self._connection,iri=b.iri)
|
|
707
|
+
self.assertEqual(dict(b.attachedToRole), {Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW,
|
|
708
|
+
Xsd_QName('hyha:HyperHamletMember'): DataPermission.DATA_UPDATE})
|
|
709
|
+
|
|
649
710
|
unpriv = Connection(userId="factorytestuser",
|
|
650
711
|
credentials="Waseliwas",
|
|
651
712
|
context_name="DEFAULT")
|
|
@@ -653,7 +714,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
653
714
|
Book = factory.createObjectInstance('Book')
|
|
654
715
|
b = Book.read(con=self._connection,
|
|
655
716
|
iri=b.iri)
|
|
656
|
-
b.
|
|
717
|
+
b.attachedToRole['oldap:Unknown'] = DataPermission.DATA_UPDATE
|
|
657
718
|
with self.assertRaises(OldapErrorNoPermission):
|
|
658
719
|
b.update()
|
|
659
720
|
|
|
@@ -736,6 +797,10 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
736
797
|
self.assertEqual(tinfo['path'], 'test/subtest')
|
|
737
798
|
self.assertEqual(tinfo['permval'], '2')
|
|
738
799
|
|
|
800
|
+
def test_read_media_object_by_id_C(self):
|
|
801
|
+
with self.assertRaises(OldapErrorNotFound):
|
|
802
|
+
res = ResourceInstance.get_media_object_by_id(con=self._unpriv, mediaObjectId='Hlon4w5TSplO.tif')
|
|
803
|
+
|
|
739
804
|
def test_read_media_object_by_iri_A(self):
|
|
740
805
|
res = ResourceInstance.get_media_object_by_iri(con=self._connection, mediaObjectIri='urn:uuid:1b8e3f42-6d7a-4c9b-a3f8-93c2e5d7b901')
|
|
741
806
|
self.assertEqual(res['iri'], Iri("urn:uuid:1b8e3f42-6d7a-4c9b-a3f8-93c2e5d7b901"))
|
|
@@ -769,6 +834,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
769
834
|
self.assertEqual(tinfo['path'], 'test/subtest')
|
|
770
835
|
self.assertEqual(tinfo['permval'], '2')
|
|
771
836
|
|
|
837
|
+
|
|
772
838
|
def test_create_media_object(self):
|
|
773
839
|
dm = DataModel.read(con=self._connection, project='test')
|
|
774
840
|
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
@@ -625,13 +625,13 @@ class TestResourceClass(unittest.TestCase):
|
|
|
625
625
|
self.assertIsNone(prop10.prop.name)
|
|
626
626
|
self.assertIsNone(prop10.prop.description)
|
|
627
627
|
|
|
628
|
-
prop11 = r1[Xsd_QName('oldap:
|
|
629
|
-
self.assertEqual(prop11.prop.property_class_iri, Xsd_QName('oldap:
|
|
628
|
+
prop11 = r1[Xsd_QName('oldap:hasRole')]
|
|
629
|
+
self.assertEqual(prop11.prop.property_class_iri, Xsd_QName('oldap:hasRole'))
|
|
630
630
|
self.assertEqual(prop11.prop.creator, Iri('https://orcid.org/0000-0003-1681-4036'))
|
|
631
631
|
self.assertEqual(prop11.prop.created, Xsd_dateTime('2023-11-04T12:00:00+00:00'))
|
|
632
632
|
self.assertEqual(prop11.prop.contributor, Iri('https://orcid.org/0000-0003-1681-4036'))
|
|
633
633
|
self.assertEqual(prop11.prop.modified, Xsd_dateTime('2023-11-04T12:00:00Z'))
|
|
634
|
-
self.assertEqual(prop11.prop.toClass, Xsd_QName('oldap:
|
|
634
|
+
self.assertEqual(prop11.prop.toClass, Xsd_QName('oldap:Role'))
|
|
635
635
|
|
|
636
636
|
# @unittest.skip('Work in progress')
|
|
637
637
|
def test_reading(self):
|