Skip to content

Commit b78a760

Browse files
authored
Merge pull request #9 from dfresh613/readme-updates-for-tests
describe how to run unit tests in readme
2 parents d26d356 + b040586 commit b78a760

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def make_casbin_change(manager):
4848
# Manager is an casbin.enforcer.Enforcer object to make changes to Casbin
4949
return jsonify({'message': 'If you see this you have access'})
5050
```
51-
Example Config
51+
Example Config
5252
This example file can be found in `tests/casbin_files`
5353
```ini
5454
[request_definition]
@@ -66,7 +66,7 @@ e = some(where (p.eft == allow))
6666
[matchers]
6767
m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act
6868
```
69-
Example Policy
69+
Example Policy
7070
This example file can be found in `tests/casbin_files`
7171
```csv
7272
p, alice, /dataset1/*, GET
@@ -84,20 +84,22 @@ g, cathy, dataset1_admin
8484

8585
Development
8686
------------
87-
1. Fork
88-
2. Install Dev ENV
87+
88+
#### Run unit tests
89+
1. Fork/Clone repository
90+
2. Install flask-authz dependencies, and run `pytest`
8991
```python
90-
# Install Flask-Casbin with Dev packages
9192
pip install -r dev_requirements.txt
9293
pip install -r requirements.txt
93-
pip install -e .
94-
# Install Pre-commits
94+
pytest
95+
```
96+
97+
#### Setup pre-commit checks
98+
```python
9599
pre-commit install
96-
# Create feature branch
97-
git checkout -b feature-more-cool-stuff
98-
# Code stuff
99100
```
100-
Then push your changes and create a PR
101+
102+
101103
#### update requirements with pip-tools
102104
```bash
103105
# update requirements.txt

0 commit comments

Comments
 (0)