import json

from fixtures import PostSerializer


def test_single(post):
    data = PostSerializer().to_json(post)

    assert json.loads(data) == {'posts': [{'id': 1, 'title': 'My title'}]}


def test_meta(post):
    data = PostSerializer().to_json(post, meta={'key': 'value'})

    assert json.loads(data)['meta']['key'] == 'value'

@@ -187,16 +187,379 @@
 e'%7D%5D%7D%0A%0A%0A
+def test_multiple(post_factory):%0A    post = post_factory(id=1, title='A title')%0A    another_post = post_factory(id=2, title='Another title')%0A%0A    data = PostSerializer().to_json(%5Bpost, another_post%5D)%0A%0A    assert json.loads(data) == %7B%0A        'posts': %5B%0A            %7B'id': 1, 'title': 'A title'%7D,%0A            %7B'id': 2, 'title': 'Another title'%7D,%0A        %5D%0A    %7D%0A%0A%0A
 def test

Add test for multiple resources