Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_stripe: Convert NamedTuple to dataclass.

Anders Kaseorg9756ac0db786
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index 9318ef441f3..4aa853d7707 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -4,6 +4,7 @@ import os
import random
import re
import sys
+from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from decimal import Decimal
from functools import wraps
@@ -13,7 +14,6 @@ from typing import (
Dict,
List,
Mapping,
- NamedTuple,
Optional,
Sequence,
Tuple,
@@ -2834,7 +2834,8 @@ class StripeTest(StripeTestCase):
invoices = self.create_invoices(customer, num_invoices)
return realm, customer, plan, invoices
- class Row(NamedTuple):
+ @dataclass
+ class Row:
realm: Realm
expected_plan_type: int
plan: Optional[CustomerPlan]