Skip to content

Commit 05fbc3c

Browse files
authored
Update contributing.md
1 parent 26d6209 commit 05fbc3c

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

contributing.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
11
# Contributing
22

3-
If you would like to help out with this project, please submit an issue or a pull request (including tests). 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 merged in. To help speed up the process, please write tests to cover your changes. I will review/merge them as soon as possible.
4+
5+
# Testing
6+
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.
8+
9+
*WARNING*: The Tests connect to the QBO API and create/modify/delete data. DO NOT USE A PRODUCTION ACCOUNT!
10+
11+
## Testing setup:
12+
13+
1. Create/login into your [Intuit Developer account](https://developer.intuit.com).
14+
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:
16+
```
17+
export CLIENT_ID="<Client ID>"
18+
export CLIENT_SECRET="<Client Secret>"
19+
export COMPANY_ID="<Realm ID>"
20+
export ACCESS_TOKEN="<Access token>"
21+
export REFRESH_TOKEN="<Refresh token>"
22+
```
23+
24+
*Note*: You will need to update the access token when it expires.
25+
26+
5. Install *nose* and *coverage*. Using Pip:
27+
`pip install nose coverage`
28+
29+
6. Run `nosetests . --with-coverage --cover-package=quickbooks`
30+
31+
## Creating new tests
32+
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.
33+
34+
Example:
35+
```
36+
from tests.integration.test_base import QuickbooksTestCase
37+
38+
class SampleTestCase(QuickbooksTestCase):
39+
def test_something(self):
40+
vendors = Vendor.all(max_results=1, qb=self.qb_client)
41+
```

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy