Skip to content

Commit

Permalink
Updated tests & test models to include model changes with circular re…
Browse files Browse the repository at this point in the history
…ferences
  • Loading branch information
Codemation committed Jan 7, 2022
1 parent 647f0ff commit 2ed8397
Show file tree
Hide file tree
Showing 20 changed files with 356 additions and 210 deletions.
88 changes: 48 additions & 40 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,25 @@ jobs:
run: |
for env in postgres; do
export ENV=$env;
pytest tests/test_database.py;
pytest tests/test_model_insertions.py;
pytest tests/test_model_updates.py;
pytest tests/test_model_deletions.py;
pytest tests/test_models.py;
pytest tests/test_query_caching.py;
pytest tests/test_model_filtering_operators.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_model_counting.py;
pytest tests/test_querying.py;
pytest tests/test_query_no_caching.py;
pytest tests/test_integration_fastapi.py;
pytest tests/test_database.py -s -x;
pytest tests/test_integration_fastapi.py -s -x;
pytest tests/test_model_1_to_1.py -s -x;
pytest tests/test_model_advanced.py -s -x;
pytest tests/test_model_connections.py -s -x;
pytest tests/test_model_counting.py -s -x;
pytest tests/test_model_deletions.py -s -x;
pytest tests/test_model_filtering_operators.py -s -x;
pytest tests/test_model_insertions.py -s -x;
pytest tests/test_model_limit_offset.py -s -x;
pytest tests/test_model_many_to_many.py -s -x;
pytest tests/test_models.py -s -x;
pytest tests/test_model_updates.py -s -x;
pytest tests/test_query_caching.py -s -x;
pytest tests/test_querying.py -s -x;
pytest tests/test_query_no_caching.py -s -x;
for mig_test in {0..7}; do
pytest tests/migrations/test_model_migration_$mig_test.py;
done
pytest tests/test_model_connections.py
done
test-mysql:
# Containers must run in Linux based operating systems
Expand Down Expand Up @@ -111,22 +114,25 @@ jobs:
run: |
for env in mysql; do
export ENV=$env;
pytest tests/test_database.py;
pytest tests/test_model_insertions.py;
pytest tests/test_model_updates.py;
pytest tests/test_model_deletions.py;
pytest tests/test_models.py;
pytest tests/test_query_caching.py;
pytest tests/test_model_filtering_operators.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_model_counting.py;
pytest tests/test_querying.py;
pytest tests/test_query_no_caching.py;
pytest tests/test_integration_fastapi.py;
pytest tests/test_database.py -s -x;
pytest tests/test_integration_fastapi.py -s -x;
pytest tests/test_model_1_to_1.py -s -x;
pytest tests/test_model_advanced.py -s -x;
pytest tests/test_model_connections.py -s -x;
pytest tests/test_model_counting.py -s -x;
pytest tests/test_model_deletions.py -s -x;
pytest tests/test_model_filtering_operators.py -s -x;
pytest tests/test_model_insertions.py -s -x;
pytest tests/test_model_limit_offset.py -s -x;
pytest tests/test_model_many_to_many.py -s -x;
pytest tests/test_models.py -s -x;
pytest tests/test_model_updates.py -s -x;
pytest tests/test_query_caching.py -s -x;
pytest tests/test_querying.py -s -x;
pytest tests/test_query_no_caching.py -s -x;
for mig_test in {0..7}; do
pytest tests/migrations/test_model_migration_$mig_test.py;
done
pytest tests/test_model_connections.py
done
# Label of the container job
Expand Down Expand Up @@ -165,21 +171,23 @@ jobs:
- name: Run Tests - Sqlite
run: |
for env in sqlite; do
export ENV=$env;
pytest tests/test_database.py;
pytest tests/test_model_insertions.py;
pytest tests/test_model_updates.py;
pytest tests/test_model_deletions.py;
pytest tests/test_models.py;
pytest tests/test_query_caching.py;
pytest tests/test_model_filtering_operators.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_model_counting.py;
pytest tests/test_querying.py;
pytest tests/test_query_no_caching.py;
pytest tests/test_integration_fastapi.py;
pytest tests/test_database.py -s -x;
pytest tests/test_integration_fastapi.py -s -x;
pytest tests/test_model_1_to_1.py -s -x;
pytest tests/test_model_advanced.py -s -x;
pytest tests/test_model_connections.py -s -x;
pytest tests/test_model_counting.py -s -x;
pytest tests/test_model_deletions.py -s -x;
pytest tests/test_model_filtering_operators.py -s -x;
pytest tests/test_model_insertions.py -s -x;
pytest tests/test_model_limit_offset.py -s -x;
pytest tests/test_model_many_to_many.py -s -x;
pytest tests/test_models.py -s -x;
pytest tests/test_model_updates.py -s -x;
pytest tests/test_query_caching.py -s -x;
pytest tests/test_querying.py -s -x;
pytest tests/test_query_no_caching.py -s -x;
for mig_test in {0..7}; do
pytest tests/migrations/test_model_migration_$mig_test.py;
done
pytest tests/test_model_connections.py
done
91 changes: 48 additions & 43 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,25 @@ jobs:
- name: Run Tests - mysql
run: |
for env in mysql; do
export ENV=$env;
pytest tests/test_database.py;
pytest tests/test_model_insertions.py;
pytest tests/test_model_updates.py;
pytest tests/test_model_deletions.py;
pytest tests/test_models.py;
pytest tests/test_model_advanced.py;
pytest tests/test_query_caching.py;
pytest tests/test_model_filtering_operators.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_querying.py;
pytest tests/test_query_no_caching.py;
pytest tests/test_integration_fastapi.py;
pytest tests/test_database.py -s -x;
pytest tests/test_integration_fastapi.py -s -x;
pytest tests/test_model_1_to_1.py -s -x;
pytest tests/test_model_advanced.py -s -x;
pytest tests/test_model_connections.py -s -x;
pytest tests/test_model_counting.py -s -x;
pytest tests/test_model_deletions.py -s -x;
pytest tests/test_model_filtering_operators.py -s -x;
pytest tests/test_model_insertions.py -s -x;
pytest tests/test_model_limit_offset.py -s -x;
pytest tests/test_model_many_to_many.py -s -x;
pytest tests/test_models.py -s -x;
pytest tests/test_model_updates.py -s -x;
pytest tests/test_query_caching.py -s -x;
pytest tests/test_querying.py -s -x;
pytest tests/test_query_no_caching.py -s -x;
for mig_test in {0..7}; do
pytest tests/migrations/test_model_migration_$mig_test.py;
done
pytest tests/test_model_connections.py
done
# Label of the container job
Expand Down Expand Up @@ -105,23 +106,25 @@ jobs:
run: |
for env in sqlite; do
export ENV=$env;
pytest tests/test_database.py;
pytest tests/test_model_insertions.py;
pytest tests/test_model_updates.py;
pytest tests/test_model_deletions.py;
pytest tests/test_models.py;
pytest tests/test_model_advanced.py;
pytest tests/test_query_caching.py;
pytest tests/test_model_filtering_operators.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_querying.py;
pytest tests/test_query_no_caching.py;
pytest tests/test_integration_fastapi.py;
pytest tests/test_database.py -s -x;
pytest tests/test_integration_fastapi.py -s -x;
pytest tests/test_model_1_to_1.py -s -x;
pytest tests/test_model_advanced.py -s -x;
pytest tests/test_model_connections.py -s -x;
pytest tests/test_model_counting.py -s -x;
pytest tests/test_model_deletions.py -s -x;
pytest tests/test_model_filtering_operators.py -s -x;
pytest tests/test_model_insertions.py -s -x;
pytest tests/test_model_limit_offset.py -s -x;
pytest tests/test_model_many_to_many.py -s -x;
pytest tests/test_models.py -s -x;
pytest tests/test_model_updates.py -s -x;
pytest tests/test_query_caching.py -s -x;
pytest tests/test_querying.py -s -x;
pytest tests/test_query_no_caching.py -s -x;
for mig_test in {0..7}; do
pytest tests/migrations/test_model_migration_$mig_test.py;
done
pytest tests/test_model_connections.py
done
test-postgres:
needs: test-mysql
Expand Down Expand Up @@ -172,21 +175,23 @@ jobs:
run: |
for env in postgres; do
export ENV=$env;
pytest tests/test_database.py;
pytest tests/test_model_insertions.py;
pytest tests/test_model_updates.py;
pytest tests/test_model_deletions.py;
pytest tests/test_models.py;
pytest tests/test_model_advanced.py;
pytest tests/test_query_caching.py;
pytest tests/test_model_filtering_operators.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_model_limit_offset.py;
pytest tests/test_querying.py;
pytest tests/test_query_no_caching.py;
pytest tests/test_integration_fastapi.py;
pytest tests/test_database.py -s -x;
pytest tests/test_integration_fastapi.py -s -x;
pytest tests/test_model_1_to_1.py -s -x;
pytest tests/test_model_advanced.py -s -x;
pytest tests/test_model_connections.py -s -x;
pytest tests/test_model_counting.py -s -x;
pytest tests/test_model_deletions.py -s -x;
pytest tests/test_model_filtering_operators.py -s -x;
pytest tests/test_model_insertions.py -s -x;
pytest tests/test_model_limit_offset.py -s -x;
pytest tests/test_model_many_to_many.py -s -x;
pytest tests/test_models.py -s -x;
pytest tests/test_model_updates.py -s -x;
pytest tests/test_query_caching.py -s -x;
pytest tests/test_querying.py -s -x;
pytest tests/test_query_no_caching.py -s -x;
for mig_test in {0..7}; do
pytest tests/migrations/test_model_migration_$mig_test.py;
done
pytest tests/test_model_connections.py
done
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
log_cli=true
Loading

0 comments on commit 2ed8397

Please sign in to comment.