Example #1
0
class TestGetPost(unittest.TestCase):
    """
    Test method VimBlogger._get_post
    """
    def setUp(self):
        """
        Create VimBlogger object
        """
        self.vimob = VimBlogger(None, shared.LOGIN, shared.PASS)
        self.vimob.blog = shared.Mock()

        link = shared.Mock()
        link.href = "mock.com"
        link.feed = shared.Mock()

        self.vimob.blog.get_post_link = lambda: link

    def test_get_post(self):
        """
        Nothing really to test here. Maybe in the future :)
        """
        result = self.vimob._get_post('1234')
        self.assertEqual(type(result), shared.MockPost)