diff options
| author | chillaranand <anand21nanda@gmail.com> | 2017-01-21 18:43:44 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-25 12:23:46 -0500 |
| commit | d6eaf7c0183cd04b78f2a55e1d60bb7e59598310 (patch) | |
| tree | ab02fd9949d4bfa23e27dea45e213ce334c883f0 /tests/aggregation | |
| parent | dc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff) | |
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'tests/aggregation')
| -rw-r--r-- | tests/aggregation/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index 25a1e00827..8178cb8bcc 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -1088,7 +1088,7 @@ class AggregateTestCase(TestCase): class MyMax(Max): def as_sql(self, compiler, connection): self.set_source_expressions(self.get_source_expressions()[0:1]) - return super(MyMax, self).as_sql(compiler, connection) + return super().as_sql(compiler, connection) with self.assertRaisesMessage(FieldError, "Cannot compute Max('id__max'): 'id__max' is an aggregate"): Book.objects.annotate(Max('id')).annotate(my_max=MyMax('id__max', 'price')) @@ -1097,7 +1097,7 @@ class AggregateTestCase(TestCase): class MyMax(Max): def as_sql(self, compiler, connection): self.set_source_expressions(self.get_source_expressions()[0:1]) - return super(MyMax, self).as_sql(compiler, connection) + return super().as_sql(compiler, connection) with self.assertRaisesMessage(TypeError, 'Complex aggregates require an alias'): Book.objects.aggregate(MyMax('pages', 'price')) @@ -1172,7 +1172,7 @@ class AggregateTestCase(TestCase): function = 'GREATEST' def as_sqlite(self, compiler, connection): - return super(Greatest, self).as_sql(compiler, connection, function='MAX') + return super().as_sql(compiler, connection, function='MAX') qs = Publisher.objects.annotate( price_or_median=Greatest(Avg('book__rating'), Avg('book__price')) |
