-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcdb971
commit 2cb0a91
Showing
7 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: endpoints.columns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,7 @@ | |
LanesInsertBody, | ||
LanesUpdateBody, | ||
LanesListParams, | ||
ColumnsListParams, | ||
ColumnsInsertBody, | ||
ColumnsUpdateBody, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ markers = [ | |
"workspaces_history", | ||
"workflows", | ||
"lanes", | ||
"columns", | ||
] | ||
|
||
[build-system] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from pytest import mark | ||
from kanbanize_sdk import Kanbanize, ColumnsInsertBody | ||
|
||
|
||
@mark.columns | ||
def test_list_columns(requests_mock): | ||
test_json = { | ||
'data': [ | ||
{ | ||
'column_id': 1, | ||
'workflow': 0, | ||
'section': 0, | ||
'parent_column_id': 0, | ||
'position': 0, | ||
'name': 'Teste', | ||
'description': 'Description teste', | ||
'color': 'ffffff', | ||
'limit': 0, | ||
'cards_per_row': 0, | ||
'flow_type': 1 | ||
} | ||
] | ||
} | ||
requests_mock.get('https://teste.kanbanize.com/api/v2/boards/1/columns', json=test_json) | ||
service = Kanbanize({'subdomain': 'teste', 'api_key': 'teste_key'}) | ||
assert service.columns().list(board_id=1) == test_json.get('data') | ||
|
||
|
||
@mark.columns | ||
def test_inset_columns(requests_mock): | ||
test_json = { | ||
'data': { | ||
'column_id': 0, | ||
'workflow': 0, | ||
'section': 0, | ||
'parent_column_id': 0, | ||
'position': 0, | ||
'name': 'Teste', | ||
'description': 'Description teste', | ||
'color': 'ffffff', | ||
'limit': 0, | ||
'cards_per_row': 0, | ||
'flow_type': 1 | ||
} | ||
} | ||
requests_mock.post('https://teste.kanbanize.com/api/v2/boards/1/columns', json=test_json) | ||
service = Kanbanize({'subdomain': 'teste', 'api_key': 'teste_key'}) | ||
body = ColumnsInsertBody( | ||
workflow_id=1, section=1, parent_column_id=1, position=1, name='Test', limit=0, cards_per_row=0, flow_type=0 | ||
) | ||
assert service.columns().insert(board_id=1, body=body) == test_json.get('data') |