Esempio n. 1
0
def test1112():
    """Series with 1 ep (in a season) and 1 OTO (seasonless)"""
    p = Producer(name='Universal')
    p.save()

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

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

    e1 = SeriesEpisode(name="Go West Young Monkey")
    e1.seasons = [se,]
    e1.save()

    e2 = OneTimeOnlyEpisode(name="Curious George XMAS")
    e2.save()

    s = Series(name="Curious George")
    s.onetimeonlys = [e2,]
    s.save()

    sa = SeasonAssociation(season=se)
    sa.series = s
    sa.episode = e1
    sa.save()
Esempio n. 2
0
def test6():
    """Series with OTO"""
    p = Producer(name='WGBH Productions')
    p.save()

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

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

    e1 = OneTimeOnlyEpisode(name="Surviving Ebola")
    e1.seasons = [se,]
    e1.save()

    # get the previous
    s = session.query(Series).filter(Series.name=="NOVA").all()[0]
    s.seasons = [se,]
    s.episodes = [e1,]
    s.save()

    sa = SeasonAssociation(season=se)
    sa.series = s
    sa.episode = e1
    sa.save()
Esempio n. 3
0
def test10():
    """Series with OTO"""
    p = Producer(name='CAPC')
    p.save()

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

    e1 = OneTimeOnlyEpisode(name="A Capitol Fourth 2014")
    e1.save()

    s = Series(name="A Capitol Fourth")
    s.onetimeonlys = [e1,]
    s.save()
Esempio n. 4
0
def test2():
    """Franchised, Series, NO Season, 1 OTO"""
    p = Producer(name='BBC Productions')
    p.save()

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

    ep1 = OneTimeOnlyEpisode(name="Downton Abbey 2014 X-mas Special")
    ep1.save()

    s = Series(name='Downton Abbey')
    s.onetimeonlys = [ep1]
    s.orgs = [p, d]
    s.save()

    # get the previous
    f = session.query(Franchise).filter(Franchise.name=="Masterpiece").all()[0]
    f.serieses.append(s)
    f.save()