def test_n_gold_tasks_no_tasks(self): """Test n_gold_tasks returns 0 for user if the project has no tasks""" project = ProjectFactory.create() n_gold_tasks = helpers.n_gold_tasks(project.id) assert n_gold_tasks == 0, n_gold_tasks
def test_n_gold_tasks_gold_tasks(self): """Test n_gold_tasks returns 1 for user if the project has 1 gold tasks""" project = ProjectFactory.create() task = TaskFactory.create(project=project, calibration=1) n_gold_tasks = helpers.n_gold_tasks(project.id) assert n_gold_tasks == 1, n_gold_tasks