Fix broken tests.
This commit is contained in:
parent
8d7626855e
commit
5732cefcf3
|
@ -1,13 +1,16 @@
|
|||
# coding: utf-8
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
from django.db.models.fields import FieldDoesNotExist
|
||||
from django_tables2.templatetags.django_tables2 import title
|
||||
from django_tables2.utils import A, AttributeDict, OrderBy, OrderByTuple
|
||||
from collections import OrderedDict
|
||||
from itertools import islice
|
||||
import six
|
||||
import warnings
|
||||
|
||||
from django.db.models.fields import FieldDoesNotExist
|
||||
import six
|
||||
|
||||
from django_tables2.templatetags.django_tables2 import title
|
||||
from django_tables2.utils import A, AttributeDict, OrderBy, OrderByTuple
|
||||
from ..utils import python_2_unicode_compatible
|
||||
|
||||
|
||||
class Library(object):
|
||||
"""
|
||||
|
@ -249,6 +252,7 @@ class Column(object): # pylint: disable=R0902
|
|||
return cls(verbose_name=verbose_name)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class BoundColumn(object):
|
||||
"""
|
||||
A *run-time* version of `.Column`. The difference between
|
||||
|
@ -278,7 +282,7 @@ class BoundColumn(object):
|
|||
self.column = column
|
||||
self.name = name
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return six.text_type(self.header)
|
||||
|
||||
@property
|
||||
|
|
|
@ -151,7 +151,7 @@ class OrderByTuple(tuple):
|
|||
transformed.append(item)
|
||||
return super(OrderByTuple, cls).__new__(cls, transformed)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return ','.join(self)
|
||||
|
||||
def __contains__(self, name):
|
||||
|
|
|
@ -261,7 +261,7 @@ def test_as_html_db_queries(transactional_db):
|
|||
# with queries(count=1):
|
||||
# PersonTable(Person.objects.all()).as_html()
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestQueries(TransactionTestCase):
|
||||
def test_as_html_db_queries(self):
|
||||
class PersonTable(tables.Table):
|
||||
|
|
Loading…
Reference in New Issue