mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
parent
6b6d13bf6e
commit
36e90d1f45
12 changed files with 154 additions and 71 deletions
|
@ -4,13 +4,13 @@ from django.contrib.postgres.aggregates import (
|
|||
RegrSYY, StatAggregate, StringAgg,
|
||||
)
|
||||
from django.db.models.expressions import F, Value
|
||||
from django.test import TestCase
|
||||
from django.test.utils import Approximate
|
||||
|
||||
from . import PostgresSQLTestCase
|
||||
from .models import AggregateTestModel, StatTestModel
|
||||
|
||||
|
||||
class TestGeneralAggregate(TestCase):
|
||||
class TestGeneralAggregate(PostgresSQLTestCase):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
AggregateTestModel.objects.create(boolean_field=True, char_field='Foo1', integer_field=0)
|
||||
|
@ -111,7 +111,7 @@ class TestGeneralAggregate(TestCase):
|
|||
self.assertEqual(values, {'stringagg': ''})
|
||||
|
||||
|
||||
class TestStatisticsAggregate(TestCase):
|
||||
class TestStatisticsAggregate(PostgresSQLTestCase):
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
StatTestModel.objects.create(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue