From c8b0361add2c50c39b9bb13ac7bb5f9dbd1a4541 Mon Sep 17 00:00:00 2001 From: xtreak Date: Mon, 25 Feb 2019 11:00:15 +0000 Subject: [PATCH] Fix DeprecationWarning in tests when accessing collections.abc classes via collections --- tests/test_renderers.py | 4 ++-- tests/test_serializer.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_renderers.py b/tests/test_renderers.py index 8518a3f7c..58ca9f860 100644 --- a/tests/test_renderers.py +++ b/tests/test_renderers.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import re -from collections import MutableMapping, OrderedDict +from collections import OrderedDict import pytest from django.conf.urls import include, url @@ -16,7 +16,7 @@ from django.utils.safestring import SafeText from django.utils.translation import ugettext_lazy as _ from rest_framework import permissions, serializers, status -from rest_framework.compat import coreapi +from rest_framework.compat import coreapi, MutableMapping from rest_framework.decorators import action from rest_framework.renderers import ( AdminRenderer, BaseRenderer, BrowsableAPIRenderer, DocumentationRenderer, diff --git a/tests/test_serializer.py b/tests/test_serializer.py index 6e4ff22b2..07f88b557 100644 --- a/tests/test_serializer.py +++ b/tests/test_serializer.py @@ -5,13 +5,12 @@ import inspect import pickle import re import unittest -from collections import Mapping import pytest from django.db import models from rest_framework import exceptions, fields, relations, serializers -from rest_framework.compat import unicode_repr +from rest_framework.compat import unicode_repr, Mapping from rest_framework.fields import Field from .models import (