@@ -28,6 +28,27 @@ def test_get_a_roles(self):
2828 f"{ self .client .endpoint } roles/{ role_uid } " )
2929 self .assertEqual (response .status_code , 200 )
3030
31+ def test_create_taxonomy (self ):
32+ data = {
33+ "taxonomy" : {
34+ "uid" : "taxonomy_testing1" ,
35+ "name" : "taxonomy_testing1" ,
36+ "description" : "Description for Taxonomy 1"
37+ }
38+ }
39+ response = self .client .stack (api_key ).taxonomy ().create (data )
40+ self .assertEqual (response .status_code , 201 )
41+
42+ def test_create_terms (self ):
43+ data = {
44+ "term" : {
45+ "uid" : "term_test1" ,
46+ "name" : "term_test1" ,
47+ "parent_uid" : None
48+ }
49+ }
50+ response = self .client .stack (api_key ).taxonomy ("taxonomy_1" ).terms ().create (data )
51+ self .assertEqual (response .status_code , 201 )
3152
3253 def test_create (self ):
3354 data = {
@@ -106,6 +127,36 @@ def test_create(self):
106127 "acl" :{
107128 "read" :True
108129 }
130+ },
131+ {
132+ "module" : "taxonomy" ,
133+ "taxonomies" : ["taxonomy_testing1" ],
134+ "terms" : ["taxonomy_testing1.term_test1" ],
135+ "content_types" : [
136+ {
137+ "uid" : "$all" ,
138+ "acl" : {
139+ "read" : True ,
140+ "sub_acl" : {
141+ "read" : True ,
142+ "create" : True ,
143+ "update" : True ,
144+ "delete" : True ,
145+ "publish" : True
146+ }
147+ }
148+ }
149+ ],
150+ "acl" : {
151+ "read" : True ,
152+ "sub_acl" : {
153+ "read" : True ,
154+ "create" : True ,
155+ "update" : True ,
156+ "delete" : True ,
157+ "publish" : True
158+ }
159+ }
109160 }
110161 ]
111162 }
@@ -207,6 +258,14 @@ def test_update_roles(self):
207258 self .assertEqual (response .request .url ,
208259 f"{ self .client .endpoint } roles/{ role_uid } " )
209260 self .assertEqual (response .status_code , 200 )
261+
262+ def test_delete (self ):
263+ response = self .client .stack (api_key ).taxonomy ("taxonomy_testing1" ).terms ("term_test1" ).delete ()
264+ self .assertEqual (response .status_code , 200 )
265+
266+ def test_delete_taxonomy (self ):
267+ response = self .client .stack (api_key ).taxonomy ("taxonomy_testing1" ).delete ()
268+ self .assertEqual (response .status_code , 200 )
210269
211270
212271 def test_delete_roles (self ):
0 commit comments