mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-16 17:22:32 +03:00
fix imports in tests
This commit is contained in:
parent
4b9bdb0f6c
commit
2d26752e7d
|
@ -5,11 +5,13 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
from decimal import ROUND_DOWN, ROUND_UP, Decimal
|
from decimal import ROUND_DOWN, ROUND_UP, Decimal
|
||||||
|
from enum import auto
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import pytz
|
import pytz
|
||||||
from django.core.exceptions import ValidationError as DjangoValidationError
|
from django.core.exceptions import ValidationError as DjangoValidationError
|
||||||
|
from django.db.models import IntegerChoices
|
||||||
from django.http import QueryDict
|
from django.http import QueryDict
|
||||||
from django.test import TestCase, override_settings
|
from django.test import TestCase, override_settings
|
||||||
from django.utils.timezone import activate, deactivate, override
|
from django.utils.timezone import activate, deactivate, override
|
||||||
|
@ -1825,9 +1827,6 @@ class TestChoiceField(FieldValues):
|
||||||
assert exc_info.value.detail == ['"2" is not a valid choice.']
|
assert exc_info.value.detail == ['"2" is not a valid choice.']
|
||||||
|
|
||||||
def test_enum_choices(self):
|
def test_enum_choices(self):
|
||||||
from enum import auto
|
|
||||||
from django.db.models import IntegerChoices
|
|
||||||
|
|
||||||
class ChoiceCase(IntegerChoices):
|
class ChoiceCase(IntegerChoices):
|
||||||
first = auto()
|
first = auto()
|
||||||
second = auto()
|
second = auto()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user