# coding: utf-8
try:
    import unittest2
except ImportError, e:
    import unittest as unittest2

import datetime
import os

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):

    def test_article_with_metadata(self):
        reader = readers.RstReader({})
        content, metadata = reader.read(_filename('article_with_metadata.rst'))
        expected = {
            'category': 'yeah',
            'author': u'Alexis Métaireau',
            'title': 'This is a super article !',
            'summary': 'Multi-line metadata should be supported\nas well as <strong>inline markup</strong>.',
            'date': datetime.datetime(2010, 12, 2, 10, 14),
            'tags': ['foo', 'bar', 'foobar'],
        }
        self.assertDictEqual(metadata, expected)

@@ -34,17 +34,29 @@
 nittest2
+ as unittest
 %0A
-
 except I
@@ -93,21 +93,8 @@
 test
- as unittest2
 %0A%0Aim
@@ -232,16 +232,17 @@
 tent')%0A%0A
+%0A
 def _fil
@@ -302,16 +302,16 @@
 args)%0A%0A%0A
+
 class Rs
@@ -330,17 +330,16 @@
 unittest
-2
 .TestCas
@@ -876,16 +876,65 @@
       %7D%0A
+%0A        for key, value in expected.items():%0A    
         
@@ -948,34 +948,38 @@
 sert
-Dict
 Equal
-(metadata, expected
+s(value, metadata%5Bkey%5D, key
 )%0A

Make the readers tests a bit more verbose.