This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/workers/test/test_repositoryactioncounter.py
Joseph Schorr df3f47c79a Add a RepositorySearchScore table and calculation to the RAC worker
This will be used in a followup PR to order search results instead of the RAC join. Currently, the join with the RAC table in search results in a lookup of ~600K rows, which causes searching to take ~6s. This PR denormalizes the data we need, as well as allowing us to score based on a wider band (6 months vs the current 1 week).
2017-04-10 14:29:02 -04:00

10 lines
404 B
Python

from data import model, database
from test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file
from workers.repositoryactioncounter import RepositoryActionCountWorker
def test_repositoryactioncount(app):
database.RepositoryActionCount.delete().execute()
database.RepositorySearchScore.delete().execute()
rac = RepositoryActionCountWorker()
rac._count_repository_actions()