From cc8bb0a0f5b3f9a44dc2cd49aedf9445c335ab2d Mon Sep 17 00:00:00 2001 From: Edward Emanuel Date: Thu, 4 Jan 2024 10:08:15 -0600 Subject: [PATCH 1/2] Added test --- tests/unit/objects/test_creditmemo.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/objects/test_creditmemo.py b/tests/unit/objects/test_creditmemo.py index 87de54e..0935fec 100644 --- a/tests/unit/objects/test_creditmemo.py +++ b/tests/unit/objects/test_creditmemo.py @@ -28,6 +28,14 @@ def test_valid_object_name(self): self.assertTrue(result) + def test_to_ref(self): + obj = CreditMemo() + obj.Id = 123 + + ref = obj.to_ref() + self.assertEqual(ref.value, obj.Id) + self.assertEqual(ref.type, "CreditMemo") + class DiscountLineDetailTests(unittest.TestCase): def test_init(self): From f50309a87245e5f049bc47186567f5833ce0a2f5 Mon Sep 17 00:00:00 2001 From: Edward Emanuel Date: Thu, 4 Jan 2024 10:12:34 -0600 Subject: [PATCH 2/2] Fix workflow --- .github/workflows/codecov.yaml | 4 ---- .github/workflows/python-package.yml | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 .github/workflows/codecov.yaml diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml deleted file mode 100644 index ec2befe..0000000 --- a/.github/workflows/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ -name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 41f7112..e2210b0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -38,3 +38,7 @@ jobs: - name: Test with pytest run: | pytest tests/unit + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}