mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
See if additional DB URL test is affecting the outcome
This commit is contained in:
parent
18cc93e3c2
commit
f35f681961
1 changed files with 16 additions and 16 deletions
|
|
@ -385,22 +385,22 @@ class ValueTests(TestCase):
|
|||
'USER': '',
|
||||
}})
|
||||
|
||||
def test_database_url_additional_args(self):
|
||||
|
||||
def mock_database_url_caster(self, url, engine=None):
|
||||
return {'URL': url, 'ENGINE': engine}
|
||||
|
||||
with patch('configurations.values.DatabaseURLValue.caster',
|
||||
mock_database_url_caster):
|
||||
value = DatabaseURLValue(
|
||||
engine='django_mysqlpool.backends.mysqlpool')
|
||||
with env(DATABASE_URL='sqlite://'):
|
||||
self.assertDictEqual(value.setup('DATABASE_URL'), {
|
||||
'default': {
|
||||
'URL': 'sqlite://',
|
||||
'ENGINE': 'django_mysqlpool.backends.mysqlpool'
|
||||
}
|
||||
})
|
||||
# def test_database_url_additional_args(self):
|
||||
#
|
||||
# def mock_database_url_caster(self, url, engine=None):
|
||||
# return {'URL': url, 'ENGINE': engine}
|
||||
#
|
||||
# with patch('configurations.values.DatabaseURLValue.caster',
|
||||
# mock_database_url_caster):
|
||||
# value = DatabaseURLValue(
|
||||
# engine='django_mysqlpool.backends.mysqlpool')
|
||||
# with env(DATABASE_URL='sqlite://'):
|
||||
# self.assertDictEqual(value.setup('DATABASE_URL'), {
|
||||
# 'default': {
|
||||
# 'URL': 'sqlite://',
|
||||
# 'ENGINE': 'django_mysqlpool.backends.mysqlpool'
|
||||
# }
|
||||
# })
|
||||
|
||||
def test_email_url_value(self):
|
||||
value = EmailURLValue()
|
||||
|
|
|
|||
Loading…
Reference in a new issue