-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
111be98
commit 50ca05a
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: EZID Py Test | ||
tags: [] | ||
--- | ||
|
||
1. Set up virtual environment | ||
|
||
```python | ||
python3 -m venv .test-venv | ||
``` | ||
|
||
2. Activate virtual environment | ||
```python | ||
source .test-venv/bin/activate | ||
``` | ||
|
||
|
||
3. Install requirements.txt | ||
```python | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
``` | ||
|
||
|
||
4. Set up Django settings module | ||
```bash | ||
export DJANGO_SETTINGS_MODULE=settings.tests | ||
``` | ||
|
||
5. Start mysql | ||
```bash | ||
brew services start mysql | ||
``` | ||
|
||
6. Run mysql_test_setup.sh | ||
```bash | ||
shell tests/mysql_test_setup.sh | ||
``` | ||
|
||
7. Set up file system | ||
```bash | ||
mkdir -p ../download/public ../logs | ||
``` | ||
|
||
8. Setup DB and static files | ||
```python | ||
./manage.py migrate | ||
./manage.py collectstatic --no-input | ||
``` | ||
|
||
9. Load DB fixture | ||
```python | ||
./manage.py loaddata db | ||
``` | ||
|
||
10. Run tests | ||
```python | ||
pytest --maxfail 10 | ||
``` |