Skip to content

Commit 6267c77

Browse files
committed
Update contributing doc
1 parent cae8ed1 commit 6267c77

File tree

3 files changed

+57
-17
lines changed

3 files changed

+57
-17
lines changed

Pipfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7-
nose = "*"
87
coverage = "*"
98
twine = "*"
9+
pytest = "*"
10+
pytest-cov = "*"
1011

1112
[packages]
1213
urllib3 = ">=2.1.0"

Pipfile.lock

Lines changed: 43 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contributing.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
# Contributing
22

3-
I am accepting pull requests. Sometimes life gets busy and it takes me a little while to get everything merged in. To help speed up the process, please write tests to cover your changes. I will review/merge them as soon as possible.
3+
I am accepting pull requests. Sometimes life gets busy and it takes me a little while to get everything reviewed and merged in. To help speed up the process, please write tests to cover your changes. I will review/merge them as soon as possible.
44

55
# Testing
66

7-
I use [nose](https://nose.readthedocs.io/en/latest/index.html) and [Coverage](https://coverage.readthedocs.io/en/latest/) to run the test suite.
7+
I use [pytest](https://docs.pytest.org/en/7.4.x/contents.html), [Coverage](https://coverage.readthedocs.io/en/latest/), and [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) to run the test suite.
88

99
*WARNING*: The Tests connect to the QBO API and create/modify/delete data. DO NOT USE A PRODUCTION ACCOUNT!
1010

1111
## Testing setup:
1212

1313
1. Create/login into your [Intuit Developer account](https://developer.intuit.com).
1414
2. On your Intuit Developer account, create a Sandbox company and an App.
15-
3. Go to the Intuit Developer OAuth 2.0 Playground and fill out the form to get an **access token** and **refresh token**. You will need to copy the following values into your enviroment variables:
15+
3. Go to the Intuit Developer OAuth 2.0 Playground and fill out the form to get a **refresh token**. You will need to copy the following values into your enviroment variables:
1616
```
1717
export CLIENT_ID="<Client ID>"
1818
export CLIENT_SECRET="<Client Secret>"
19-
export COMPANY_ID="<Realm ID>"
20-
export ACCESS_TOKEN="<Access token>"
19+
export COMPANY_ID="<Realm ID>"
2120
export REFRESH_TOKEN="<Refresh token>"
2221
```
2322

24-
*Note*: You will need to update the access token when it expires.
23+
*Note*: You will need to update the refresh token when it expires.
2524

26-
5. Install *nose* and *coverage*. Using Pip:
27-
`pip install nose coverage`
25+
5. Install *pytest*, *coverage*, and *pytest-cov*. Using Pip (or whatever):
26+
`pip install pytest coverage pytest-cov`
2827

29-
6. Run `nosetests . --with-coverage --cover-package=quickbooks`
28+
6. Run all tests: ```pytest --cov```
29+
Run only unit tests: ```pytest tests/unit --cov```
30+
Run only integration tests: ```pytest tests/intergration --cov```
31+
32+
3033

3134
## Creating new tests
3235
Normal Unit tests that do not connect to the QBO API should be located under `test/unit` Test that connect to QBO API should go under `tests/integration`. Inheriting from `QuickbooksTestCase` will automatically setup `self.qb_client` to use when connecting to QBO.

0 commit comments

Comments
 (0)