Ejemplo n.º 1
0
    def test_init(self):
        lookup1 = Person(key="key", value="value")
        self.assertIsNotNone(lookup1)
        self.assertEqual("<Person(id='n/a', key='key', value='value')>", str(lookup1))

        lookup2 = Person(id=1, key="key", value="value")
        self.assertIsNotNone(lookup2)
        self.assertEqual("<Person(id='1', key='key', value='value')>", str(lookup2))
Ejemplo n.º 2
0
 def _get_entity(self, key, value):
     return Person(key=key, value=value)