From c23a1d199e54b582298b0008f08a4aa9eab1c112 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Thu, 4 Apr 2019 17:44:59 +0200 Subject: [PATCH] Skip generateschema command tests when deps not installed. --- tests/schemas/test_managementcommand.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/schemas/test_managementcommand.py b/tests/schemas/test_managementcommand.py index 780f50bd2..a4d038e55 100644 --- a/tests/schemas/test_managementcommand.py +++ b/tests/schemas/test_managementcommand.py @@ -7,7 +7,7 @@ from django.test import TestCase from django.test.utils import override_settings from django.utils import six -from rest_framework.compat import yaml +from rest_framework.compat import uritemplate, yaml from rest_framework.utils import json from rest_framework.views import APIView @@ -23,6 +23,7 @@ urlpatterns = [ @override_settings(ROOT_URLCONF=__name__) +@pytest.mark.skipif(not uritemplate, reason='uritemplate is not installed') class GenerateSchemaTests(TestCase): """Tests for management command generateschema."""