Exemplo n.º 1
0
def test7():
    """Series with Subseries and 1 Ep"""
    p = Producer(name='WGBH Productions')
    p.save()

    d = Distributor(name='PBS Distribution')
    d.save()

    se = Season(name='17', ordinal=17)
    se.save()

    e1 = SeriesEpisode(name="Antiques Roadshow Seattle, Ep1")
    e1.seasons = [se,]
    e1.save()

    sss = Season(name='1', ordinal=1)
    sss.save()

    ss1 = SubSeries(name="Antiques Roadshow in Seattle")
    ss1.save()

    s = Series(name="Antiques Roadshow")
    s.subseries = [ss1]
    s.seasons = [se,]
    s.save()

    sa = SeasonAssociation(season=se)
    sa.series = s
    sa.episode = e1
    sa.save()

    sa2 = SeasonAssociation(season=sss)
    sa2.series = ss1
    sa2.episode = e1
    sa2.save()
Exemplo n.º 2
0
def test9():
    """WEIRD ONE: Series and Subseries of different seasons sharing the same Ep"""
    p = Producer(name='WETA Productions')
    p.save()

    d = Distributor(name='PBS Distribution')
    d.save()

    se = Season(name='41', ordinal=41)
    se.save()

    se2 = Season(name='2012', ordinal=2012)
    se2.save()

    e1 = SeriesEpisode(name="Democratic National Convention September 5, 2015 Part 1")
    e1.save()

    ss1 = SubSeries(name="Elections")
    #ss1.episodes = [e1,]
    ss1.seasons = [se2]
    ss1.save()

    s = session.query(Series).filter(Series.name=="PBS NewsHour").all()[0]
    #s = Series(name="PBS NewsHour")
    s.subseries = [ss1]
    s.seasons = [se,]
    s.save()

    sa = SeasonAssociation(season=se)
    sa.series = s
    sa.episode = e1
    sa.save()

    sa2 = SeasonAssociation(season=se2)
    sa2.series = ss1
    sa2.episode = e1
    sa2.save()
Exemplo n.º 3
0
def test5():
    """Series with Ep in one season AND Subseries with Ep in a different season"""
    p = Producer(name='WGBH Productions')
    p.save()

    d = Distributor(name='PBS Distribution')
    d.save()

    se = Season(name='38', ordinal=38)
    se.save()

    se1 = Season(name='1', ordinal=1)
    se1.save()

    e1 = SeriesEpisode(name="Making Stuff Similar Episode")
    e1.save()

    e2 = SeriesEpisode(name="Making Stuff Similar Episode2")
    e2.save()

    ss1 = SubSeries(name="Making Stuff")
    ss1.save()

    s = Series(name="NOVA")
    s.subseries = [ss1]
    s.save()

    sa = SeasonAssociation(season=se)
    sa.series = s
    sa.episode = e1
    sa.save()

    sa2 = SeasonAssociation(season=se1)
    sa2.series = ss1
    sa2.episode = e2
    sa2.save()