def test_create_from_dict(self): d = dict(html='foo') tb = HTMLBlock.create_from_dict(d) self.assertEqual(tb.html, 'foo')