mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Make the readers tests a bit more verbose.
This commit is contained in:
parent
3bdc769134
commit
1ec2779f5e
1 changed files with 7 additions and 4 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# coding: utf-8
|
||||
try:
|
||||
import unittest2
|
||||
import unittest2 as unittest
|
||||
except ImportError, e:
|
||||
import unittest as unittest2
|
||||
import unittest
|
||||
|
||||
import datetime
|
||||
import os
|
||||
|
|
@ -12,11 +12,12 @@ from pelican import readers
|
|||
CUR_DIR = os.path.dirname(__file__)
|
||||
CONTENT_PATH = os.path.join(CUR_DIR, 'content')
|
||||
|
||||
|
||||
def _filename(*args):
|
||||
return os.path.join(CONTENT_PATH, *args)
|
||||
|
||||
|
||||
class RstReaderTest(unittest2.TestCase):
|
||||
class RstReaderTest(unittest.TestCase):
|
||||
|
||||
def test_article_with_metadata(self):
|
||||
reader = readers.RstReader({})
|
||||
|
|
@ -29,4 +30,6 @@ class RstReaderTest(unittest2.TestCase):
|
|||
'date': datetime.datetime(2010, 12, 2, 10, 14),
|
||||
'tags': ['foo', 'bar', 'foobar'],
|
||||
}
|
||||
self.assertDictEqual(metadata, expected)
|
||||
|
||||
for key, value in expected.items():
|
||||
self.assertEquals(value, metadata[key], key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue