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)
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()
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)
def __init__(self, load_accounts=True): self.config = AppConfig() self.accman = AccountManager(self.config, load_accounts) self.column_manager = ColumnManager(self.config)
def test_init(self, monkeypatch): config = AppConfig() accman = AccountManager(config, load=False) assert len(accman) == 0
def setup_class(self, monkeypatch): config = AppConfig() self.account = Account.new("twitter", "foo") self.accman = AccountManager(config, load=False)