Exemple #1
0
 def testStateClass(self):
     """Test State Class."""
     # TODO(sll): Need to test that this model's parent must be an
     # exploration.
     o = State(id='The hash id')
     o.name = 'The name'
     o.content = [Content(type='text', value='The content')]
     self.assertEqual(o.key.id(), 'The hash id')
     self.assertEqual(o.name, 'The name')
     self.assertEqual(len(o.content), 1)
     self.assertEqual(o.content[0].type, 'text')
     self.assertEqual(o.content[0].value, 'The content')