-
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.
Merge pull request #11 from groveco/added-linter
Added linter
- Loading branch information
Showing
13 changed files
with
219 additions
and
82 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,8 @@ | ||
name: Ruff | ||
on: [ push, pull_request ] | ||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/ruff-action@v1 |
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,15 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_install_hook_types: | ||
- pre-commit | ||
- prepare-commit-msg | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.7.4 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.0.6 | ||
0.0.7 |
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
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 |
---|---|---|
@@ -1,18 +1,23 @@ | ||
import pytest | ||
from shopify_client.endpoint import DraftOrdersEndpoint | ||
|
||
|
||
@pytest.fixture | ||
def draft_orders_endpoint(mock_client): | ||
return DraftOrdersEndpoint(client=mock_client, endpoint="draft_orders") | ||
|
||
|
||
def test_complete_draft_order(draft_orders_endpoint, mock_client): | ||
mock_client.request.return_value = {"result": "completed"} | ||
response = draft_orders_endpoint.complete(1) | ||
mock_client.request.assert_called_once_with("PUT", "draft_orders/1/complete.json") | ||
assert response == {"result": "completed"} | ||
|
||
|
||
def test_send_invoice(draft_orders_endpoint, mock_client): | ||
mock_client.request.return_value = {"result": "invoice_sent"} | ||
response = draft_orders_endpoint.send_invoice(1) | ||
mock_client.request.assert_called_once_with("PUT", "draft_orders/1/send_invoice.json") | ||
mock_client.request.assert_called_once_with( | ||
"PUT", "draft_orders/1/send_invoice.json" | ||
) | ||
assert response == {"result": "invoice_sent"} |
Oops, something went wrong.