This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.encoding import python_2_unicode_compatible
|
|
||||||
|
|
||||||
|
|
||||||
@python_2_unicode_compatible
|
class MyModel(models.Model): # pylint: disable=model-has-unicode
|
||||||
class MyModel(models.Model):
|
|
||||||
chars = models.CharField(max_length=10)
|
chars = models.CharField(max_length=10)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.chars
|
return self.chars
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return self.__str__()
|
||||||
|
|||||||
10
tox.ini
10
tox.ini
@@ -1,10 +1,14 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py3,py2
|
envlist = py3-django3,py3-django2,py2-django1
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = coverage
|
deps = coverage
|
||||||
py2: pylint-django<2
|
py2-django1: django<2
|
||||||
py3: pylint-django
|
py2-django1: pylint-django<2
|
||||||
|
py3-django2: django<3
|
||||||
|
py3-django2: pylint-django
|
||||||
|
py3-django3: django
|
||||||
|
py3-django3: pylint-django
|
||||||
pytest
|
pytest
|
||||||
mock
|
mock
|
||||||
commands = coverage run -m pytest
|
commands = coverage run -m pytest
|
||||||
|
|||||||
Reference in New Issue
Block a user