Exemplo n.º 1
0
    def test_content_graph(self):
        video = Video()
        video.put()

        text = Text()
        text.put()

        game = Game()
        game.put()

        arc = Arc()
        arc.origin = video.key
        arc.destination = text.key
        arc.put()

        arc = Arc()
        arc.origin = video.key
        arc.destination = game.key
        arc.put()

        nexts = Arc.find_destinations(video.key).fetch(100)

        self.assertEquals(text, nexts[0].destination.get())
        self.assertEquals(game, nexts[1].destination.get())