Skip to content

Commit

Permalink
Fix failing test due to external library change
Browse files Browse the repository at this point in the history
  • Loading branch information
uhurusurfa committed Oct 28, 2024
1 parent ba24d3c commit 63cac8d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,20 @@ 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 63cac8d

Please sign in to comment.