示例#1
0
    def setUp(self):
        self.venue = Venue(name="MET Lab", lat=10.0, lng=20.0, website="http://projectjamjar.com", utc_offset=12)
        self.venue.save()

        self.concert = Concert(date="2016-01-01", venue=self.venue)
        self.concert.save()

        self.user = User(username='******', email='*****@*****.**', first_name='Test', last_name='Test', password='******')
        self.user.save()

        self.video1 = Video(name="video1", concert_id=self.concert.id, length=10.0, user=self.user)
        self.video1.save()

        self.video2 = Video(name="video2", concert_id=self.concert.id, length=10.0, user=self.user)
        self.video2.save()

        self.video3 = Video(name="video3", concert_id=self.concert.id, length=10.0, user=self.user)
        self.video3.save()

        self.edge1 = Edge.new(video1_id=self.video1.id, video2_id=self.video2.id, confidence=30, offset=20.0)
        self.edge2 = Edge.new(video1_id=self.video2.id, video2_id=self.video3.id, confidence=40, offset=10.0)
        self.edge3 = Edge.new(video1_id=self.video1.id, video2_id=self.video3.id, confidence=50, offset=30.0)
示例#2
0
 def test_edge(self):
     edge = Edge.new(self.video1.id, self.video2.id, 0, 1)
     self.assertTrue(edge.id is not None)