Commit graph

30 commits

Author SHA1 Message Date
Christopher Broderick
448c5ab1b6 Address flake8 issues 2024-11-07 13:33:00 +00:00
Christopher Broderick
63cac8d54e Fix failing test due to external library change 2024-10-28 20:55:21 +00:00
Tomasz Kłoczko
6dc2340dfe really drop support for python<=3.7
Filer all code over `pyupgrade --py38`.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
2024-03-18 16:08:42 +00:00
Paolo Melchiorre
352d95b2ab
Update github actions and fix pipeline 2023-01-19 18:06:05 +01:00
Paolo Melchiorre
794b858548
Fixed #336 -- Update Python and Django versions (#337) 2022-08-05 16:42:58 +02:00
Michael Käufl
6cb932e47f Run pyupgrade on the code
But don't touch string formatting.

https://pypi.org/project/pyupgrade/
2021-01-19 13:11:16 +06:00
Mike
1c6fd0f505 Add PositiveIntegerValue to only allow positive integers (#186) 2018-03-15 13:19:50 +01:00
Nicolas Delaby
8f318991c2 Drop unmaintained version of django and python
- Drop django==1.9 as it reached end of life
- Drop python2.6, python3.3, and bring python3.6
- Bring django-2.0 in the matrix as expected failure until we add its
support
2017-09-30 14:37:38 +02:00
Daniel Hahler
6f163727dc tests: fix test_cache_url_value for new django-cache-url 2017-09-29 12:21:12 +02:00
José Antonio Perdiguero
a606003c77 Fix truthy and falsey of values (#162) 2016-10-13 00:00:47 +02:00
Johannes Hoppe
7aaffd3a95 Add EMAIL_USE_SSL to tests (#157)
`dj-email-url` added support for `EMAIL_USE_SSL` in its latest
version.
2016-06-14 18:59:13 +02:00
Maxime Rouyrre
7b4df1f6ce Fixed test_database_url_value 2016-03-11 12:01:40 +01:00
Daniel Hahler
09eae37b23 Fix test_cache_url_value for newer django-cache-url
This fixes the following failure:

    ERROR: test_cache_url_value (tests.test_values.ValueTests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "…/django-configurations/configurations/values.py", line 158, in to_python
        return self._caster(value)
      File "…/django-configurations/.tox/py34-dj18/lib/python3.4/site-packages/django_cache_url.py", line 98, in parse
        config['LOCATION'] = "%s:%s:%s" % (url.hostname, url.port, db)
      File "…/pyenv/3.4.3/lib/python3.4/urllib/parse.py", line 156, in port
        port = int(port, 10)
    ValueError: invalid literal for int() with base 10: 'port'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "…/django-configurations/tests/test_values.py", line 415, in test_cache_url_value
        value = CacheURLValue(cache_url)
      File "…/django-configurations/configurations/values.py", line 420, in __init__
        self.default = self.to_python(self.default)
      File "…/django-configurations/configurations/values.py", line 423, in to_python
        value = super(DictBackendMixin, self).to_python(value)
      File "…/django-configurations/configurations/values.py", line 160, in to_python
        raise ValueError(self.message.format(value))
    ValueError: Cannot interpret cache URL value 'redis://user@host:port/1'

    ----------------------------------------------------------------------
    Ran 63 tests in 1.132s

    FAILED (errors=1)
2015-12-17 13:05:03 +01:00
Jannis Leidel
010067b433 Introduced environ_required parameter for Value class. Refs #118. 2015-08-09 14:54:55 +02:00
Miguel Araujo Perez
e09e1e0f42 Added equal operator to values.Value
Allows value setting to work when checking if setting variable is within
a list, i.e: settings.database in ['default', 'other']

Signed-off-by: Jannis Leidel <jannis@leidel.info>
2015-03-16 20:54:17 +01:00
Christian Abbott
8287ab6f7f Merge remote-tracking branch 'upstream/master' 2015-01-07 03:19:24 -08:00
Christian Abbott
e0a68fdbb6 Rename TupleOfTupleValue to SingleNestedTupleValue; Add SingleNestedListValue and do a DRY refactor of ListValue, TupleValue, and their SingleNested subclasses 2015-01-07 03:08:30 -08:00
Jannis Leidel
44476bdd1d Merge remote-tracking branch 'hiisi13/master'
Signed-off-by: Jannis Leidel <jannis@leidel.info>
2015-01-06 23:15:08 +01:00
Mauricio de Abreu Antunes
3f892f9814 Fixed wrong behaviour when assigning BooleanValue
When assigning False to a BooleanValue and reusing it was raising a
ValueError exception because BooleanValue was evaluating False as None.

Thanks to @abbottc for catching this error.
2014-12-27 10:34:40 -02:00
Christian Abbott
c4ba5ca559 Add TupleOfTuplesValue along with associated tests and updated documentation 2014-12-18 07:15:20 -08:00
Jannis Leidel
fb9275744e Merge pull request #78 from slafs/validationmixinfix
fix ValidationMixin instantiation with no default
2014-12-12 16:28:58 +01:00
Sławek Ehlert
8d366fca44 fix ValidationMixin instantiation with no default
with tests. fixes #69
2014-10-30 23:44:48 +01:00
He Weiwei
f8ebb564da fix bug of setup_value func for EmailURLValue 2014-10-08 12:19:35 +08:00
Sven Aßmann
4018f7b42a - add late_binding to value with default False
- this enables a value to load from environment if the env variable name is given at construction time
- cache value of environment value now in property value
- add __new__ to allow a construction of a given type from environment directly. In this case now Value instance is constructed but an instance of the desired type that is covered by the Value implementation. For Value it is str, for DictValue it is dict etc.
- extend tests for this new behavior
- extend test coverage for some other places
2014-05-02 22:51:48 +02:00
Jannis Leidel
280be2e3e2 Fix database URL test. 2014-04-15 15:36:37 -04:00
Dmitry Kozhedubov
3ae1e368c2 test_cache_url_value fix 2014-03-02 20:41:40 +04:00
Dmitry Kozhedubov
e33eeeb871 Ability to pass keyword args to CastingMixin casters 2014-03-02 13:31:42 +04:00
Jannis Leidel
f087cea84d Added SearchURLValue. 2014-01-16 19:00:29 +01:00
Stefan Wehrmeyer
5e8dc290df Fix CacheURLValue default value
Remove unused kwarg 'name' that shadows kwarg
'default'.
2013-10-06 16:33:24 +02:00
Jannis Leidel
5898acb594 Moved tests out of the configurations packages. 2013-09-09 11:02:43 +02:00
Renamed from configurations/tests/test_values.py (Browse further)