예제 #1
0
 def initialize_http(self):
     app_config = AppConfig()
     proxy = app_config.get_proxy()
     timeout = app_config.get_socket_timeout()
     self.http = TurpialHTTPOAuth(self.base_url,
                                  OAUTH_OPTIONS,
                                  proxies=proxy.to_url_config(),
                                  timeout=timeout)
예제 #2
0
    def __init__(self, log_level=logging.DEBUG):
        logging.basicConfig(level=log_level)

        self.queue = Queue.Queue()
        self.log = logging.getLogger('Core')
        self.log.debug('Started')
        self.config = AppConfig()

        self.accman = AccountManager(self.config)
        self.load_registered_accounts()
        self.load_registered_columns()
예제 #3
0
    def setup_class(self, monkeypatch):
        config = AppConfig()
        columns = ["foo-twitter-timeline", "bar-twitter-replies"]
        monkeypatch.setattr(config, "get_stored_columns", lambda: columns)

        self.colman = ColumnManager(config)
예제 #4
0
 def __init__(self, load_accounts=True):
     self.config = AppConfig()
     self.accman = AccountManager(self.config, load_accounts)
     self.column_manager = ColumnManager(self.config)
예제 #5
0
 def test_init(self, monkeypatch):
     config = AppConfig()
     accman = AccountManager(config, load=False)
     assert len(accman) == 0
예제 #6
0
 def setup_class(self, monkeypatch):
     config = AppConfig()
     self.account = Account.new("twitter", "foo")
     self.accman = AccountManager(config, load=False)