Refs #11929 -- Fixed ordering of test YAML dumps.
Thanks Nick Pope for the review.
This commit is contained in:
parent
9006189c0e
commit
a9b8898242
|
@ -85,13 +85,13 @@ class NoYamlSerializerTestCase(SimpleTestCase):
|
||||||
@unittest.skipUnless(HAS_YAML, "No yaml library detected")
|
@unittest.skipUnless(HAS_YAML, "No yaml library detected")
|
||||||
class YamlSerializerTestCase(SerializersTestBase, TestCase):
|
class YamlSerializerTestCase(SerializersTestBase, TestCase):
|
||||||
serializer_name = "yaml"
|
serializer_name = "yaml"
|
||||||
pkless_str = """- fields:
|
pkless_str = """- model: serializers.category
|
||||||
name: Reference
|
|
||||||
pk: null
|
pk: null
|
||||||
model: serializers.category
|
fields:
|
||||||
- fields:
|
name: Reference
|
||||||
name: Non-fiction
|
- model: serializers.category
|
||||||
model: serializers.category"""
|
fields:
|
||||||
|
name: Non-fiction"""
|
||||||
|
|
||||||
mapping_ordering_str = """- model: serializers.article
|
mapping_ordering_str = """- model: serializers.article
|
||||||
pk: %(article_pk)s
|
pk: %(article_pk)s
|
||||||
|
@ -147,18 +147,18 @@ class YamlSerializerTestCase(SerializersTestBase, TestCase):
|
||||||
@unittest.skipUnless(HAS_YAML, "No yaml library detected")
|
@unittest.skipUnless(HAS_YAML, "No yaml library detected")
|
||||||
class YamlSerializerTransactionTestCase(SerializersTransactionTestBase, TransactionTestCase):
|
class YamlSerializerTransactionTestCase(SerializersTransactionTestBase, TransactionTestCase):
|
||||||
serializer_name = "yaml"
|
serializer_name = "yaml"
|
||||||
fwd_ref_str = """- fields:
|
fwd_ref_str = """- model: serializers.article
|
||||||
|
pk: 1
|
||||||
|
fields:
|
||||||
headline: Forward references pose no problem
|
headline: Forward references pose no problem
|
||||||
pub_date: 2006-06-16 15:00:00
|
pub_date: 2006-06-16 15:00:00
|
||||||
categories: [1]
|
categories: [1]
|
||||||
author: 1
|
author: 1
|
||||||
|
- model: serializers.category
|
||||||
pk: 1
|
pk: 1
|
||||||
model: serializers.article
|
fields:
|
||||||
- fields:
|
|
||||||
name: Reference
|
name: Reference
|
||||||
|
- model: serializers.author
|
||||||
pk: 1
|
pk: 1
|
||||||
model: serializers.category
|
fields:
|
||||||
- fields:
|
name: Agnes"""
|
||||||
name: Agnes
|
|
||||||
pk: 1
|
|
||||||
model: serializers.author"""
|
|
||||||
|
|
Loading…
Reference in New Issue