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