Example #1
0
def before(sc):
    scc.app = TestApp(application)
    scc.basepath = os.path.dirname(os.path.abspath(__file__))
    scc.tweets = []
    
    with Stub() as TweetsCrawler:
        from twitter_poll.tweets_crawler import TweetsCrawler
        tweets_crawler = TweetsCrawler()
        tweets_crawler.get_tweets() >> get_tweets()
Example #2
0
def main():
    tweets = TweetsCrawler.get_tweets()
    return dict(total=len(tweets))