Example #1
0
def test_tokenloader():
    company_id = int(sys.argv[1])
    t = TokenLoader(company_id)
    r = ReleaseLoader(company_id)
    a = ArticleLoader(company_id)
        
    print 'Testing TokenLoader'
    print 'company-id: {0}'.format(company_id)

    articles = a.get_articles()
    article_id = articles.itervalues().next().id()
    print 'article-id: {0}'.format(article_id)
    print 'TOKENS:'
    print t.get_article_tokens(article_id, False)

    releases = r.get_releases()
    release_id = releases.itervalues().next().id()
    print 'release-id: {0}'.format(release_id)
    print 'TOKENS:'
    print t.get_release_tokens(release_id, False)
Example #2
0
def test_articleloader():
    company_id = int(sys.argv[1])
    a = ArticleLoader(company_id)
    print 'Testing ArticleLoader'
    print 'company-id: {0}'.format(company_id)
    print 'articles: {0}'.format(len(a.get_articles()))