Skip to content

Commit

Permalink
Merge pull request #1326 from hackforla/1309-run-unit-tests-for-prefect
Browse files Browse the repository at this point in the history
Removed prefect test `test_last_updated()` and added `pytest==7.1.2` to requirements.txt
  • Loading branch information
edwinjue authored Aug 24, 2022
2 parents 23f4bc5 + 2754bbc commit aafd47b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_test_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ jobs:
run: docker-compose run -e TESTING=True api alembic upgrade head
- name: Run unit tests
run: docker-compose run api pytest
run: docker-compose run prefect pytest
# - name: Run Postman tests
# run: chmod +x postman/test.sh && postman/test.sh
1 change: 1 addition & 0 deletions server/prefect/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ psutil==5.8.0
psycopg2-binary==2.8.6
pyee==8.1.0
pyppeteer==0.2.5
pytest==7.1.2
python-box==5.3.0
python-dateutil==2.8.1
python-slugify==4.0.1
Expand Down
7 changes: 0 additions & 7 deletions server/prefect/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
from tasks import postgres, socrata


def test_last_updated():
runner = TaskRunner(task=postgres.get_last_updated)
state = runner.run()
assert state.is_successful()
assert state.result > parse('2020-01-01', tz=None)


def test_download_data():
with prefect.context(today=datetime.today().strftime('%Y-%m-%d')):
new_state = TaskRunner(
Expand Down

0 comments on commit aafd47b

Please sign in to comment.