diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-20 22:55:10 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2019-08-24 15:13:09 +0200 |
commit | a7c2b75d48587fce826613efced163272b11e354 (patch) | |
tree | c022cf3401dce1a1ab98394c35ff4c85fd980811 /tests/django_test_app | |
parent | 36f5b30d2fb6ad535b322a875c8bfb297e97aacc (diff) | |
download | semantic-version-a7c2b75d48587fce826613efced163272b11e354.tar.gz |
Lint test code.
Diffstat (limited to 'tests/django_test_app')
-rw-r--r-- | tests/django_test_app/__init__.py | 5 | ||||
-rw-r--r-- | tests/django_test_app/models.py | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/tests/django_test_app/__init__.py b/tests/django_test_app/__init__.py index 4506810..908f97e 100644 --- a/tests/django_test_app/__init__.py +++ b/tests/django_test_app/__init__.py @@ -3,9 +3,8 @@ # This code is distributed under the two-clause BSD License. try: # pragma: no cover - import django - from django.conf import settings + import django # noqa + from django.conf import settings # noqa django_loaded = True except ImportError: # pragma: no cover django_loaded = False - diff --git a/tests/django_test_app/models.py b/tests/django_test_app/models.py index 5313e89..3a43cfc 100644 --- a/tests/django_test_app/models.py +++ b/tests/django_test_app/models.py @@ -11,18 +11,15 @@ except ImportError: if django_loaded: from semantic_version import django_fields as semver_fields - class VersionModel(models.Model): version = semver_fields.VersionField(verbose_name='my version') spec = semver_fields.SpecField(verbose_name='my spec') - class PartialVersionModel(models.Model): partial = semver_fields.VersionField(partial=True, verbose_name='partial version') optional = semver_fields.VersionField(verbose_name='optional version', blank=True, null=True) optional_spec = semver_fields.SpecField(verbose_name='optional spec', blank=True, null=True) - class CoerceVersionModel(models.Model): version = semver_fields.VersionField(verbose_name='my version', coerce=True) partial = semver_fields.VersionField(verbose_name='partial version', coerce=True, partial=True) |