# Automated BCDC API Testing
Intention is to test the CKAN API after deployment.
Current tests include:
- verification of preconfigured orgs required for testing
- CRUD tests for packages.
# Run Tests
```
pip install bcdc_apitests
pytest --pyargs bcdc_apitests --junitxml=<xml report name.xml>
```
# Packaging
[packaging docs](docs/packaging.md)
# Configure Dev Env and Running Tests
### clone
`git clone <repo>`
### virtualenv
```
python -m virtualenv ve_bcdctest
./ve_bcdctest/Scripts/activate
python -m pip install -r requirements.txt
```
* make SRC dir part of python path
```
export PYTHONPATH=./src
set PYTHONPATH=./src
```
### configure secrets
set the following env vars:
```
BCDC_API_KEY = <api key>
BCDC_URL = <URL>
```
### run tests
```
cd src
pytest
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
bcdc_apitests-0.2.1.tar.gz (41个子文件)
bcdc_apitests-0.2.1
MANIFEST.in 162B
PKG-INFO 2KB
bcdc_apitests.egg-info
PKG-INFO 2KB
requires.txt 79B
SOURCES.txt 1KB
top_level.txt 14B
dependency_links.txt 1B
setup.cfg 38B
setup.py 1KB
README.md 838B
bcdc_apitests
config
testConfig.py 2KB
__init__.py 51B
conftest.py 3KB
tests
resources
conftest.py 1KB
__init__.py 0B
test_resources.py 8KB
__init__.py 56B
organizations
test_orgs.py 3KB
conftest.py 303B
__init__.py 56B
packages
conftest.py 212B
__init__.py 0B
test_packages.py 13KB
__init__.py 499B
test_data
pkgData.json 11KB
ownerOrg.json 530B
pkgData_min.json 1KB
fixtures
load_config.py 8KB
setup_fixtures.py 3KB
users.py 6KB
ckan.py 962B
packages.py 10KB
load_data.py 5KB
__init__.py 0B
orgs.py 9KB
config_fixture.py 3KB
resources.py 5KB
helpers
read_test_config.py 9KB
read_user_config.py 1KB
__init__.py 0B
file_utils.py 1005B
共 41 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功