Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: clean up devcontainer #1769

Merged
merged 2 commits into from
Nov 1, 2023
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
9 changes: 5 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bungcip.better-toml",
"batisteo.vscode-django",
"bpruitt-goddard.mermaid-markdown-syntax-highlighting",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"hashicorp.terraform",
"mhutchie.git-graph",
"monosans.djlint",
"ms-python.python",
"ms-python.vscode-pylance",
"mrorz.language-gettext",
"qwtel.sqlite-viewer"
"ms-python.python",
"ms-python.black-formatter",
"ms-python.flake8",
"qwtel.sqlite-viewer",
"tamasfe.even-better-toml"
]
}
}
Expand Down
11 changes: 2 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"[python]": {
"editor.defaultFormatter": "ms-python.python"
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "black",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.testing.pytestArgs": [
"tests/pytest",
"--import-mode=importlib",
"--no-migrations"
],
"python.testing.pytestArgs": ["tests/pytest"],
angela-tran marked this conversation as resolved.
Show resolved Hide resolved
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"[terraform]": {
Expand Down
8 changes: 5 additions & 3 deletions tests/pytest/core/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,18 @@ def test_TransitAgency_by_slug_nonmatching():

@pytest.mark.django_db
def test_TransitAgency_all_active(model_TransitAgency):
assert TransitAgency.objects.count() == 1
count = TransitAgency.objects.count()
assert count >= 1

inactive_agency = TransitAgency.by_id(model_TransitAgency.id)
inactive_agency.pk = None
inactive_agency.active = False
inactive_agency.save()

assert TransitAgency.objects.count() == 2
assert TransitAgency.objects.count() == count + 1

result = TransitAgency.all_active()

assert len(result) == 1
assert len(result) > 0
assert model_TransitAgency in result
assert inactive_agency not in result
2 changes: 1 addition & 1 deletion tests/pytest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eu

# run normal pytests
coverage run -m pytest --no-migrations
coverage run -m pytest

# clean out old coverage results
rm -rf benefits/static/coverage
Expand Down
Loading