diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-03-13 20:06:47 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2019-03-14 13:16:48 -0400 |
commit | a57c783dd4e6dc73847081221827a1902eede88b (patch) | |
tree | fe4f348b238e7726b82036f0b535ba0ffc2122ac /tests/serializers | |
parent | 782d85b6dfa191e67c0f1d572641d8236c79174c (diff) | |
download | django-a57c783dd4e6dc73847081221827a1902eede88b.tar.gz |
Fixed serializers tests for PyYAML 5.1+.
Diffstat (limited to 'tests/serializers')
-rw-r--r-- | tests/serializers/test_yaml.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/serializers/test_yaml.py b/tests/serializers/test_yaml.py index e876597e9d..dbcbd57003 100644 --- a/tests/serializers/test_yaml.py +++ b/tests/serializers/test_yaml.py @@ -115,7 +115,9 @@ class YamlSerializerTestCase(SerializersTestBase, TestCase): author: %(author_pk)s headline: Poker has no place on ESPN pub_date: 2006-06-16 11:00:00 - categories: [%(first_category_pk)s, %(second_category_pk)s] + categories:""" + ( + ' [%(first_category_pk)s, %(second_category_pk)s]' if yaml.__version__ < '5.1' + else '\n - %(first_category_pk)s\n - %(second_category_pk)s') + """ meta_data: [] """ |