Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup commit after peer review.

  • Loading branch information...
commit 01a5359477fbc82488dddf9476581fe72c049b51 1 parent 9587d4e
@rca rca authored
View
2  AUTHORS
@@ -58,6 +58,7 @@ answer newbie questions, and generally made Django that much better:
Gisle Aas <gisle@aas.no>
Chris Adams
Mathieu Agopian <mathieu.agopian@gmail.com>
+ Roberto Aguilar <roberto@baremetal.io>
ajs <adi@sieker.info>
alang@bright-green.com
A S Alam <aalam@users.sf.net>
@@ -651,7 +652,6 @@ answer newbie questions, and generally made Django that much better:
Gasper Zejn <zejn@kiberpipa.org>
Jarek Zgoda <jarek.zgoda@gmail.com>
Cheng Zhang
- Roberto Aguilar <roberto@baremetal.io>
A big THANK YOU goes to:
View
1  django/core/serializers/__init__.py
@@ -17,7 +17,6 @@
"""
import importlib
-import sys
from django.conf import settings
from django.utils import six
View
1  tests/fixtures/tests.py
@@ -1,6 +1,5 @@
from __future__ import unicode_literals
-import unittest
import warnings
from django.contrib.sites.models import Site
View
9 tests/serializers/tests.py
@@ -451,7 +451,7 @@ class YamlImportModuleMock(object):
serializer is being imported. The importlib.import_module() call is
being made in the serializers.register_serializer().
- #12756
+ Refs: #12756
"""
def __init__(self):
self._import_module = importlib.import_module
@@ -466,7 +466,7 @@ def import_module(self, module_path):
class NoYamlSerializerTestCase(TestCase):
"""Not having pyyaml installed provides a misleading error
- #12756
+ Refs: #12756
"""
@classmethod
def setUpClass(cls):
@@ -489,7 +489,7 @@ def tearDownClass(cls):
# clear out cached serializers to clean out BadSerializer instances
serializers._serializers = {}
- def test_missing_pyyaml_error_message(self):
+ def test_serializer_pyyaml_error_message(self):
"""Using yaml serializer without pyyaml raises ImportError"""
jane = Author(name="Jane")
self.assertRaises(ImportError, serializers.serialize, "yaml", [jane])
@@ -498,7 +498,8 @@ def test_deserializer_pyyaml_error_message(self):
"""Using yaml deserializer without pyyaml raises ImportError"""
self.assertRaises(ImportError, serializers.deserialize, "yaml", "")
- def test_missing_pyyaml_error_message(self):
+ def test_dumpdata_pyyaml_error_message(self):
+ """Calling dumpdata produces an error when yaml package missing"""
self.assertRaisesRegexp(management.CommandError, YAML_IMPORT_ERROR_MESSAGE,
management.call_command, 'dumpdata', format='yaml')
View
5 tests/serializers_regress/tests.py
@@ -523,7 +523,10 @@ def streamTest(format, self):
else:
self.assertEqual(string_data, stream.content.decode('utf-8'))
-for format in filter(lambda x: not isinstance(serializers.get_serializer(x), serializers.BadSerializer), serializers.get_serializer_formats()):
+for format in [
+ f for f in serializers.get_serializer_formats()
+ if not isinstance(serializers.get_serializer(f), serializers.BadSerializer)
+ ]:
setattr(SerializerTests, 'test_' + format + '_serializer', curry(serializerTest, format))
setattr(SerializerTests, 'test_' + format + '_natural_key_serializer', curry(naturalKeySerializerTest, format))
setattr(SerializerTests, 'test_' + format + '_serializer_fields', curry(fieldsTest, format))

0 comments on commit 01a5359

Please sign in to comment.
Something went wrong with that request. Please try again.