from unittest import TestCase
from mock import patch, Mock

class TestBlog(TestCase):
    @patch('blog.Blog')
    def test_blog_posts(self, MockBlog):
        blog = MockBlog()
        blog.posts.return_value = [
            {
                'userId': 1,
                'id': 1,
                'title': 'Test Title',
                'body': 'Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy\ lies a small unregarded yellow sun.'
            }
        ]

        response = blog.posts()
        self.assertIsNotNone(response)
        self.assertIsInstance(response[0], dict)

from unittest import TestCase
from mock import patch, Mock

class TestBlog(TestCase):
    @patch('blog.Blog')
    def test_blog_posts(self, MockBlog):
        blog = MockBlog()
        blog.posts.return_value = [
            {
                'userId': 1,
                'id': 1,
                'title': 'Test Title',
                'body': 'Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy\ lies a small unregarded yellow sun.'
            }
        ]

        response = blog.posts()
        self.assertIsNotNone(response)
        self.assertIsInstance(response[0], dict)
