Skip to content

Commit

Permalink
Use a defaultdict for meta in RSS tests
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Oct 22, 2016
1 parent 16b67e2 commit 836d805
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions tests/test_rss_feeds.py
Expand Up @@ -3,12 +3,9 @@
from __future__ import unicode_literals, absolute_import

import os
import sys


from collections import defaultdict
from io import StringIO
import os
import re
import unittest

Expand Down Expand Up @@ -50,15 +47,15 @@ def setUp(self):

with mock.patch('nikola.post.get_meta',
mock.Mock(return_value=(
({'title': 'post title',
'slug': 'awesome_article',
'date': '2012-10-01 22:41',
'author': None,
'tags': 'tags',
'link': 'link',
'description': 'description',
'enclosure': 'http://www.example.org/foo.mp3',
'enclosure_length': '5'},
(defaultdict(str, {'title': 'post title',
'slug': 'awesome_article',
'date': '2012-10-01 22:41',
'author': None,
'tags': 'tags',
'link': 'link',
'description': 'description',
'enclosure': 'http://www.example.org/foo.mp3',
'enclosure_length': '5'}),
True)
))):
with mock.patch('nikola.nikola.utils.os.path.isdir',
Expand Down

0 comments on commit 836d805

Please sign in to comment.