Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
91a4390
Added users and organisations api methods
sunil-lakshman May 22, 2023
4c7f587
added requirements.txt file
sunil-lakshman May 23, 2023
6944e1c
loaded install, changlog , codeowners and release.yml file
sunil-lakshman May 23, 2023
a35426f
Organized package structure
sunil-lakshman May 24, 2023
4b0777e
Merge branch 'next' into feat/cs-38768-stack-implementation
sunil-lakshman May 24, 2023
1c4eb48
Developed stack Implementation
sunil-lakshman May 26, 2023
1d14bce
Code Optimized
sunil-lakshman May 29, 2023
24d3927
Added Mock test and Api Test cases
sunil-lakshman Jun 5, 2023
44880e1
Added test cases and coverage packages
sunil-lakshman Jun 7, 2023
55eaf55
Added API documentation and added stacks test cases
sunil-lakshman Jun 12, 2023
faf700d
Added coverage reports generartion in github action
sunil-lakshman Jul 6, 2023
d224cc3
Added global fields class
sunil-lakshman Jul 6, 2023
7c5d513
- General code improvements
ishaileshmishra Jul 6, 2023
d84e1ef
Merge pull request #8 from contentstack/fix/general-improvements
ishaileshmishra Jul 6, 2023
c1b1c80
Feat/cs 40287 workflow class implemetation (#14)
sunil-lakshman Sep 8, 2023
8a16b18
Feat/cs 41199 label class implementation (#25)
sunil-lakshman Sep 15, 2023
a2fb234
Merge branch 'main' into next
sunil-lakshman Sep 15, 2023
9793243
Feat/cs 41332 terms class implemetation (#27)
sunil-lakshman Sep 21, 2023
4aa0424
Merge branch 'main' into next
sunil-lakshman Sep 21, 2023
68b6b25
Added bulk operations class implementation (#29)
sunil-lakshman Sep 27, 2023
25e541a
Merge branch 'next' of https://github.com/contentstack/contentstack-m…
sunil-lakshman Sep 27, 2023
e628ae2
Added release and release item class implementation (#31)
sunil-lakshman Sep 28, 2023
a63683b
Merge branch 'main' into next
sunil-lakshman Sep 28, 2023
fff0f0f
Fixed pagination issue, added custom payload option in all methods an…
sunil-lakshman Dec 8, 2023
38b4e87
Merge branch 'next' of https://github.com/contentstack/contentstack-m…
sunil-lakshman Dec 12, 2023
8d16341
Resolved conflicts
sunil-lakshman Dec 12, 2023
cd19d87
Fixed code conflits
sunil-lakshman Dec 12, 2023
9103d1a
Updated changelog file
sunil-lakshman Dec 12, 2023
c47d736
Enh/dx 74 gcp na support (#47)
sunil-lakshman May 6, 2024
2eb866e
Merge branch 'main' into fix/dx-74
abhinav-from-contentstack May 6, 2024
b0263e6
Merge pull request #49 from contentstack/fix/dx-74
abhinav-from-contentstack May 6, 2024
e3c1f3d
Updated License file (#50)
sunil-lakshman May 13, 2024
f853c45
Bug/dx 588 asset upload (#51)
sunil-lakshman May 20, 2024
d39e5ef
Fix/merge issue (#53)
sunil-lakshman May 20, 2024
98d2262
Merge branch 'main' into fix/merge-branch-1
abhinav-from-contentstack May 20, 2024
9158c93
Merge pull request #54 from contentstack/fix/merge-branch-1
abhinav-from-contentstack May 20, 2024
2c2c445
Fixed license issue (#56)
sunil-lakshman May 24, 2024
47882f3
Merge pull request #57 from contentstack/main
cs-raj May 24, 2024
f37f177
Added Taxonomy permission roles Test cases (#58)
sunil-lakshman Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
## Content Management SDK For Python
---

## v1.2.0

#### Date: 08 July 2024

- Added testcases for creation of Roles with taxonomy permission.
---

## v1.1.1

#### Date: 21 May 2024
Expand Down
2 changes: 1 addition & 1 deletion contentstack_management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
__author__ = 'ishaileshmishra'
__status__ = 'debug'
__region__ = 'na'
__version__ = '1.1.1'
__version__ = '1.2.0'
__host__ = 'api.contentstack.io'
__protocol__ = 'https://'
__api_version__ = 'v3'
Expand Down
59 changes: 59 additions & 0 deletions tests/api/roles/test_roles_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ def test_get_a_roles(self):
f"{self.client.endpoint}roles/{role_uid}")
self.assertEqual(response.status_code, 200)

def test_create_taxonomy(self):
data = {
"taxonomy": {
"uid": "taxonomy_testing1",
"name": "taxonomy_testing1",
"description": "Description for Taxonomy 1"
}
}
response = self.client.stack(api_key).taxonomy().create(data)
self.assertEqual(response.status_code, 201)

def test_create_terms(self):
data = {
"term": {
"uid": "term_test1",
"name": "term_test1",
"parent_uid": None
}
}
response = self.client.stack(api_key).taxonomy("taxonomy_1").terms().create(data)
self.assertEqual(response.status_code, 201)

def test_create(self):
data = {
Expand Down Expand Up @@ -106,6 +127,36 @@ def test_create(self):
"acl":{
"read":True
}
},
{
"module": "taxonomy",
"taxonomies": ["taxonomy_testing1"],
"terms": ["taxonomy_testing1.term_test1"],
"content_types": [
{
"uid": "$all",
"acl": {
"read": True,
"sub_acl": {
"read": True,
"create": True,
"update": True,
"delete": True,
"publish": True
}
}
}
],
"acl": {
"read": True,
"sub_acl": {
"read": True,
"create": True,
"update": True,
"delete": True,
"publish": True
}
}
}
]
}
Expand Down Expand Up @@ -207,6 +258,14 @@ def test_update_roles(self):
self.assertEqual(response.request.url,
f"{self.client.endpoint}roles/{role_uid}")
self.assertEqual(response.status_code, 200)

def test_delete(self):
response = self.client.stack(api_key).taxonomy("taxonomy_testing1").terms("term_test1").delete()
self.assertEqual(response.status_code, 200)

def test_delete_taxonomy(self):
response = self.client.stack(api_key).taxonomy("taxonomy_testing1").delete()
self.assertEqual(response.status_code, 200)


def test_delete_roles(self):
Expand Down
30 changes: 30 additions & 0 deletions tests/mock/roles/test_roles_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,36 @@ def test_create(self):
"acl":{
"read":True
}
},
{
"module": "taxonomy",
"taxonomies": ["taxonomy_testing1"],
"terms": ["taxonomy_testing1.term_test1"],
"content_types": [
{
"uid": "$all",
"acl": {
"read": True,
"sub_acl": {
"read": True,
"create": True,
"update": True,
"delete": True,
"publish": True
}
}
}
],
"acl": {
"read": True,
"sub_acl": {
"read": True,
"create": True,
"update": True,
"delete": True,
"publish": True
}
}
}
]
}
Expand Down
32 changes: 31 additions & 1 deletion tests/resources/mock_roles/create.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,37 @@
"acl": {
"read": true
}
}
},
{
"module": "taxonomy",
"taxonomies": ["taxonomy_testing1"],
"terms": ["taxonomy_testing1.term_test1"],
"content_types": [
{
"uid": "$all",
"acl": {
"read": true,
"sub_acl": {
"read": true,
"create": true,
"update": true,
"delete": true,
"publish": true
}
}
}
],
"acl": {
"read": true,
"sub_acl": {
"read": true,
"create": true,
"update": true,
"delete": true,
"publish": true
}
}
}
],
"users": [],
"uid": "role_uid",
Expand Down
30 changes: 30 additions & 0 deletions tests/unit/roles/test_roles_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,36 @@ def test_create(self):
"acl":{
"read":True
}
},
{
"module": "taxonomy",
"taxonomies": ["taxonomy_testing1"],
"terms": ["taxonomy_testing1.term_test1"],
"content_types": [
{
"uid": "$all",
"acl": {
"read": True,
"sub_acl": {
"read": True,
"create": True,
"update": True,
"delete": True,
"publish": True
}
}
}
],
"acl": {
"read": True,
"sub_acl": {
"read": True,
"create": True,
"update": True,
"delete": True,
"publish": True
}
}
}
]
}
Expand Down