예제 #1
0
import unittest
from helpers import db, irc, backends, web, browser, misc
from helpers.misc import Release

channel = "#single"
config = misc.Config(
    config_file="single_multi.toml",
    web_username="******",
    web_password="******",
    irc_channels=[channel],
    irc_users=["bipbopiambot"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [
            ("my_sonarr", "abcdef123"),
            ("my_lidarr", "123456789"),
            ("my_radarr", "987654321"),
        ]
    },
)


class SingleTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(self):
        misc.tearDownClass(config)
import unittest
from helpers import db, irc, backends, web, misc
from helpers.misc import Release

channel = "#linematched"
config = misc.Config(
    config_file="linematched.toml",
    irc_channels=[channel],
    irc_users=["linematcherbot"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [
            ("line_sonarr", "lineapison"),
            ("line_lidarr", "lineapilid"),
            ("line_radarr", "lineapirad"),
        ]
    },
)


class LineMatchedTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(self):
        misc.tearDownClass(config)

    @db.db_session
    def setUp(self):
예제 #3
0
        "name": "Simple2",
        "url": "else"
    },
    {
        "channel": "#simple3",
        "name": "Simple3",
        "url": "or"
    },
]
config = misc.Config(
    config_file="pages.toml",
    irc_channels=[t["channel"] for t in trackers],
    irc_users=["bipbopsimple1", "bipbopsimple2", "bipbopsimple3"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [
            ("MySonarr", "simplesonkey"),
            ("MyLidarr", "simplelidkey"),
            ("MyRadarr", "simpleradkey"),
        ]
    },
)


class PagesTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(self):
예제 #4
0
        "name": "Simple2",
        "url": "else"
    },
    {
        "channel": "#simple3",
        "name": "Simple3",
        "url": "or"
    },
]
config = misc.Config(
    config_file="status.toml",
    irc_channels=[t["channel"] for t in trackers],
    irc_users=["bipbopstatus1", "bipbopstatus2", "bipbopstatus3"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [
            ("my_sonarr", "simplesonkey"),
            ("my_lidarr", "simplelidkey"),
            ("my_radarr", "simpleradkey"),
        ]
    },
)


class TrackerStatus:
    def __init__(self, type, name, channels, connected=True):
        self.type = type
        self.name = name
        self.channels = channels
        self.connected = connected
        self.last_ann = "Never"
import unittest
from helpers import db, irc, backends, web, browser, misc
from helpers.misc import Release

channel = "#multi"
config = misc.Config(
    config_file="multi_https.toml",
    irc_channels=[channel],
    irc_users=["bipbopimalsobot"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [
            ("my_sonarr", "abcdef123"),
            ("my_lidarr", "123456789"),
            ("my_radarr", "987654321"),
        ]
    },
)


class SingleTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(self):
        misc.tearDownClass(config)

    @db.db_session
    def setUp(self):
예제 #6
0
import unittest
from helpers import db, irc, backends, web, misc
from helpers.misc import Release
import time

channel = "#delay"
config = misc.Config(
    config_file="delay.toml",
    irc_channels=[channel],
    irc_users=["bipbopdelayed"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [
            ("delayed_sonarr", "delaysonkey"),
            ("delayed_lidarr", "delaylidkey"),
            ("delayed_radarr", "delayradkey"),
        ]
    },
)


class DelayTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(self):
        misc.tearDownClass(config)

    @db.db_session
import unittest
from helpers import db, backends, web, misc
from helpers.misc import Release

channel = "#simple1"
config = misc.Config(
    config_file="double_backends.toml",
    irc_channels=[channel],
    irc_users=["bipbopsimple1"],
    backends={
        b[0]: backends.Backend(b[0], b[1], b[2])
        for b in [
            ("Sonarr1", "sonapikey1", 10000),
            ("Sonarr2", "sonapikey1", 20000),
            ("Radarr1", "radapikey1", 7878),
            ("Radarr2", "radapikey2", 7879),
            ("Lidarr1", "lidapikey1", 5000),
            ("Lidarr2", "lidapikey2", 6000),
        ]
    },
)


class DelayTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(self):
        misc.tearDownClass(config)
예제 #8
0
import unittest
from helpers import db, irc, backends, web, misc

channel = "#simple1"
config = misc.Config(
    config_file="modes.toml",
    irc_channels=[channel],
    irc_users=["bipbopmodes"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [("MySonarr", "sonapikey1")]
    },
)


class DelayTest(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        misc.setUpClass(config, start_browser=False)

    @classmethod
    def tearDownClass(self):
        misc.tearDownClass(config)

    @db.db_session
    def setUp(self):
        backends.clear_all_backends()
        db.clear_db()

    def tearDown(self):
        web.logout()
import unittest
from helpers import db, backends, web, browser, misc
from helpers.misc import Release
import selenium

channel = "#single"
config = misc.Config(
    config_file="notify_sonarr.toml",
    irc_channels=[channel],
    irc_users=["bipbopiambot"],
    backends={
        b[0]: backends.Backend(b[0], b[1])
        for b in [("my_sonarr", "abcdef123"), ("my_radarr", "987654321")]
    },
)


class SingleTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        misc.setUpClass(config)

    @classmethod
    def tearDownClass(cls):
        misc.tearDownClass(config)

    @db.db_session
    def setUp(self):
        backends.clear_all_backends()
        db.clear_db()