-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_env.sh
More file actions
27 lines (21 loc) · 946 Bytes
/
test_env.sh
File metadata and controls
27 lines (21 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Notes on running tests:
# - Please do not run tests against the production instance of Materials Commons
# - To run a local instance with docker:
# - docker pull materialscommons/materialscommons-dev
# - docker run -d -p 8181:8181 materialscommons/materialscommons-dev
# - Before running pytest configure your local environment to use the
# local instance of Materials Commons
# Materials Commons URL
# Docker container
# export MC_API_URL="http://localhost:8181/api"
# Local install
export MC_API_URL="http://127.0.0.1:8000/api"
# A local directory where test data can be written
export MC_TEST_DATA_DIR="${PWD}/test/local_test_projects"
# The container is built with this admin account:
export MC_API_EMAIL="admin@admin.org"
export MC_API_PASSWORD="admin"
export MC_API_KEY="admintoken"
# Then run pytest with:
# - For all tests: pytest -rsap test
# - For a specific test: pytest -rsap test/test_api.py::TestAPI::test_project_api