Skip to content

Commit

Permalink
Merge pull request #392 from jazzband/fix_code_coverage_and_newly_fai…
Browse files Browse the repository at this point in the history
…ling_test

Fix code coverage and newly failing test
  • Loading branch information
uhurusurfa authored Nov 8, 2024
2 parents e109116 + 448c5ab commit 711fa66
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ jobs:
tox --verbose
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
name: Python ${{ matrix.python-version }}
name: coverage-data-${{ matrix.python-version }}
path: ".coverage.*"
include-hidden-files: true
merge-multiple: true
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
12 changes: 9 additions & 3 deletions tests/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,23 @@ def test_database_url_value(self):
value = DatabaseURLValue()
self.assertEqual(value.default, {})
with env(DATABASE_URL='sqlite://'):
self.assertEqual(value.setup('DATABASE_URL'), {
'default': {
settings_value = value.setup('DATABASE_URL')
# Compare the embedded dicts in the "default" entry so that the difference can be seen if
# it fails ... DatabaseURLValue(|) uses an external app that can add additional entries
self.assertDictEqual(
{
'CONN_HEALTH_CHECKS': False,
'CONN_MAX_AGE': 0,
'DISABLE_SERVER_SIDE_CURSORS': False,
'ENGINE': 'django.db.backends.sqlite3',
'HOST': '',
'NAME': ':memory:',
'PASSWORD': '',
'PORT': '',
'USER': '',
}})
},
settings_value['default']
)

def test_database_url_additional_args(self):

Expand Down

0 comments on commit 711fa66

Please sign in to comment.