Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
pip install -r requirements.txt

- name: Run tests
run: pytest
run: python -m pytest
env:
# The hostname, username used to communicate with the PostgreSQL service container
POSTGRES_HOST: localhost
VC_DB_USER: postgres
POSTGRES_PORT: 5432
DJANGO_DEV: 1
GH_TOKEN: 1
GH_TOKEN: 1
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ before_script:

script:
- ./manage.py collectstatic
- pytest
- python -m pytest

notifications:
email: false
Expand All @@ -27,4 +27,4 @@ notifications:
- https://webhooks.gitter.im/e/b119fa557626081e1f36
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Run Tests
Use these commands to run code style checks and the test suite::

black -l 100 --check .
DJANGO_DEV=1 pytest
DJANGO_DEV=1 python -m pytest
Copy link
Member

@pombredanne pombredanne Mar 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are in an activated virtualenv, pytest should work. Did you experience an issue here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. As mentioned here, it fails on the first run. I've generated an asciinema to reproduce the issue as well.



Data import
Expand Down
2 changes: 1 addition & 1 deletion vulnerablecode/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(self, *args, **kwargs):
urlpatterns = [
path("admin/", admin.site.urls),
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
path("api/schema/swagger-ui/", SpectacularSwaggerView.as_view(), name="swagger-ui"),
path("api/docs", SpectacularSwaggerView.as_view(), name="swagger-ui"),
path("packages/search", PackageSearchView.as_view(), name="package_search"),
path("packages/<int:pk>", PackageUpdate.as_view(), name="package_view"),
path("vulnerabilities/<int:pk>", VulnerabilityDetails.as_view(), name="vulnerability_view"),
Expand Down