Skip to content

Commit

Permalink
Chore: clean up devcontainer (#1769)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Nov 1, 2023
2 parents eec154a + 70ea25d commit 2c44fea
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
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"],
"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

0 comments on commit 2c44fea

Please sign in to comment.